lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] (no subject)


From: Greg Chicares
Subject: [lmi-commits] (no subject)
Date: Sun, 5 Jun 2016 22:18:31 +0000 (UTC)

branch: master
commit 54479ffe7243a3e3dc6875bd066ba1e5155e7600
Author: Gregory W. Chicares <address@hidden>
Date:   Sun Jun 5 20:44:08 2016 +0000

    Remove more obsolete borland workarounds
---
 any_member.hpp         |   28 ----------------------------
 callback.hpp           |   10 ++++------
 catch_exceptions.hpp   |    9 ---------
 fenv_lmi_x86.hpp       |    6 ------
 ieee754.hpp            |   13 +------------
 numeric_io_cast.hpp    |    6 ------
 platform_dependent.hpp |    3 ---
 7 files changed, 5 insertions(+), 70 deletions(-)

diff --git a/any_member.hpp b/any_member.hpp
index 4880f42..e4bae6e 100644
--- a/any_member.hpp
+++ b/any_member.hpp
@@ -260,23 +260,13 @@ class any_member
     bool operator==(any_member const&) const;
     bool operator!=(any_member const&) const;
 
-#if defined __BORLANDC__
-    // COMPILER !! The borland compiler, defectively it would seem,
-    // fails to recognize the friendship granted to function template
-    // member_cast() above.
-    template<typename ExactMemberType>
-    ExactMemberType* exact_cast();
-#endif // defined __BORLANDC__
-
     // any_entity required implementation.
     virtual std::string str() const;
     virtual std::type_info const& type() const;
 
   private:
-#if !defined __BORLANDC__
     template<typename ExactMemberType>
     ExactMemberType* exact_cast();
-#endif // !defined __BORLANDC__
 
     // any_entity required implementation.
     virtual any_member& assign(std::string const&);
@@ -559,24 +549,8 @@ class MemberSymbolTable
   protected:
     MemberSymbolTable();
 
-#if !defined __BORLANDC__
     template<typename ValueType, typename SameOrBaseClassType>
     void ascribe(std::string const&, ValueType SameOrBaseClassType::*);
-#else  // defined __BORLANDC__
-    // The borland compiler defectively can't handle non-inline member
-    // function templates.
-    template<typename ValueType, typename SameOrBaseClassType>
-    void ascribe(std::string const& s, ValueType SameOrBaseClassType::* p2m)
-        {
-        ClassType* class_object = static_cast<ClassType*>(this);
-        map_.insert
-            (member_pair_type(s, any_member<ClassType>(class_object, p2m))
-            );
-        typedef std::vector<std::string>::iterator svi;
-        svi i = std::lower_bound(member_names_.begin(), member_names_.end(), 
s);
-        member_names_.insert(i, s);
-        }
-#endif // defined __BORLANDC__
 
   private:
     void complain_that_no_such_member_is_ascribed(std::string const&) const;
@@ -641,7 +615,6 @@ any_member<ClassType> const& 
MemberSymbolTable<ClassType>::operator[]
     return i->second;
 }
 
-#if !defined __BORLANDC__
 template<typename ClassType>
 template<typename ValueType, typename SameOrBaseClassType>
 void MemberSymbolTable<ClassType>::ascribe
@@ -677,7 +650,6 @@ void MemberSymbolTable<ClassType>::ascribe
     svi i = std::lower_bound(member_names_.begin(), member_names_.end(), s);
     member_names_.insert(i, s);
 }
-#endif // !defined __BORLANDC__
 
 template<typename ClassType>
 MemberSymbolTable<ClassType>& MemberSymbolTable<ClassType>::assign
diff --git a/callback.hpp b/callback.hpp
index 0f3d5d7..31080a9 100644
--- a/callback.hpp
+++ b/callback.hpp
@@ -28,12 +28,10 @@
 #include "so_attributes.hpp"
 #include "uncopyable_lmi.hpp"
 
-#if !defined __BORLANDC__
-#   include <boost/static_assert.hpp>
-#   include <boost/type_traits/is_function.hpp>
-#   include <boost/type_traits/is_pointer.hpp>
-#   include <boost/type_traits/remove_pointer.hpp>
-#endif // !defined __BORLANDC__
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
 
 #include <stdexcept>
 
diff --git a/catch_exceptions.hpp b/catch_exceptions.hpp
index b976ed4..a137a0d 100644
--- a/catch_exceptions.hpp
+++ b/catch_exceptions.hpp
@@ -118,19 +118,10 @@ namespace lmi_test
         // std:: exceptions
         catch(std::bad_alloc const& e)
             {detail::report_exception(out, "std::bad_alloc:"       , 
e.what());}
-
-#if !defined(__BORLANDC__) || 0x0551 < __BORLANDC__
         catch(std::bad_cast const& e)
             {detail::report_exception(out, "std::bad_cast:"        , 
e.what());}
         catch(std::bad_typeid const& e)
             {detail::report_exception(out, "std::bad_typeid:"      , 
e.what());}
-#else // Old borland compiler.
-        catch(std::bad_cast const&)
-            {detail::report_exception(out, "std::bad_cast"         , "");}
-        catch(std::bad_typeid const&)
-            {detail::report_exception(out, "std::bad_typeid"       , "");}
-#endif // Old borland compiler.
-
         catch(std::bad_exception const& e)
             {detail::report_exception(out, "std::bad_exception:"   , 
e.what());}
         catch(std::domain_error const& e)
diff --git a/fenv_lmi_x86.hpp b/fenv_lmi_x86.hpp
index 2cd6bcc..a30389a 100644
--- a/fenv_lmi_x86.hpp
+++ b/fenv_lmi_x86.hpp
@@ -133,10 +133,6 @@ enum e_ieee754_rounding
     ,fe_towardzero = 0x03
     };
 
-#   if !defined __BORLANDC__
-// COMPILER !! Due to its poor support for non-type template
-// parameters, borland cannot compile this implementation.
-
 /// Parameters of 80x87 hardware control word.
 ///
 /// Reserved bits:
@@ -303,8 +299,6 @@ inline unsigned short int msw_to_intel(unsigned int m)
     return msw_to_intel(msw_control_word(m));
 }
 
-#   endif // !defined __BORLANDC__
-
 /// Default settings for x87 fpu.
 
 inline unsigned short int default_x87_control_word()
diff --git a/ieee754.hpp b/ieee754.hpp
index 8b2a072..4b0df1a 100644
--- a/ieee754.hpp
+++ b/ieee754.hpp
@@ -39,23 +39,13 @@
 /// specified if desired, although there's no guarantee that it won't
 /// arise in practice. If none is specified, then we choose one with
 /// FLT_DIG decimal digits and an exponent a bit under FLT_MAX_10_EXP,
-/// using the minimum values of those macros in C99 5.2.4.2.2/8. The
-/// same behavior is used for borland tools, which claim to support
-/// qNaNs but do not:
-///   http://lists.boost.org/MailArchives/boost/msg12131.php
-///   there's no borland option to set the floating-point hardware to
-///   allow quiet NaNs to work without raising an exception.
-/// Without this workaround, bc++5.5.1 would produce a BSOD on msw xp.
+/// using the minimum values of those macros in C99 5.2.4.2.2/8.
 
 template<typename T>
 T implausible_value(T const& t = -9.99999e35)
 {
     BOOST_STATIC_ASSERT(::boost::is_float<T>::value);
 
-#if defined __BORLANDC__
-    return t;
-#else  // !defined __BORLANDC__
-
     if(std::numeric_limits<T>::has_quiet_NaN)
         {
         return std::numeric_limits<T>::quiet_NaN();
@@ -64,7 +54,6 @@ T implausible_value(T const& t = -9.99999e35)
         {
         return t;
         }
-#endif // !defined __BORLANDC__
 }
 
 /// Return positive infinity.
diff --git a/numeric_io_cast.hpp b/numeric_io_cast.hpp
index 9d2c6e1..ddb5e3a 100644
--- a/numeric_io_cast.hpp
+++ b/numeric_io_cast.hpp
@@ -122,10 +122,8 @@ To numeric_io_cast(From from, To = To())
 template<typename To, typename From>
 struct numeric_converter
 {
-#ifndef __BORLANDC__
     BOOST_STATIC_ASSERT(boost::is_void<To>::value);
     BOOST_STATIC_ASSERT(boost::is_void<From>::value);
-#endif // ! defined __BORLANDC__
 
     To operator()(From const& from) const
         {
@@ -149,9 +147,7 @@ struct numeric_converter
 template<typename To>
 struct numeric_converter<To, std::string>
 {
-#ifndef __BORLANDC__
     BOOST_STATIC_ASSERT(boost::is_arithmetic<To>::value);
-#endif // ! defined __BORLANDC__
 
     typedef std::string From;
     To operator()(From const& from) const
@@ -220,9 +216,7 @@ struct numeric_converter<To, char const*>
 template<typename From>
 struct numeric_converter<std::string, From>
 {
-#ifndef __BORLANDC__
     BOOST_STATIC_ASSERT(boost::is_arithmetic<From>::value);
-#endif // ! defined __BORLANDC__
 
     typedef std::string To;
     To operator()(From const& from) const
diff --git a/platform_dependent.hpp b/platform_dependent.hpp
index c1e5d58..ec6e655 100644
--- a/platform_dependent.hpp
+++ b/platform_dependent.hpp
@@ -69,9 +69,6 @@
 #   include <stdio.h>                   // fileno()
 #   include <stdlib.h>                  // putenv()
 #   include <string.h>                  // _wcsdup(), strcasecmp(), strdup()
-#   ifdef __BORLANDC__
-#       define R_OK 04
-#   endif // __BORLANDC__
 #else // Unknown platform.
     // It seems too fragile to give the prototypes here:
     //   extern "C" int access(char const*, int);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]