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 14:11:37 +0000 (UTC)

branch: master
commit e302feac0ad8b6e3816d154a2cde81e688b5bbe1
Author: Gregory W. Chicares <address@hidden>
Date:   Sun Jun 5 14:11:00 2016 +0000

    Remove more obsolete borland workarounds
---
 alert.cpp                  |    8 ++------
 any_member.hpp             |   10 +++-------
 callback.hpp               |    2 --
 ieee754.hpp                |    8 ++------
 math_functors.hpp          |    8 ++------
 numeric_io_cast.hpp        |   10 +++-------
 numeric_io_test.cpp        |    8 ++------
 numeric_io_traits.hpp      |   19 +++----------------
 round_to.hpp               |    8 ++------
 safely_dereference_as.hpp  |   10 +++-------
 stream_cast.hpp            |   24 ++++--------------------
 tn_range.hpp               |    8 ++------
 tn_range_type_trammels.hpp |    8 ++------
 uncopyable_lmi.hpp         |    8 ++------
 value_cast.hpp             |   21 ---------------------
 15 files changed, 32 insertions(+), 128 deletions(-)

diff --git a/alert.cpp b/alert.cpp
index 8901985..10fbb73 100644
--- a/alert.cpp
+++ b/alert.cpp
@@ -26,12 +26,8 @@
 
 #include "alert.hpp"
 
-#if !defined __BORLANDC__
-#   include <boost/static_assert.hpp>
-#   include <boost/type_traits/is_base_and_derived.hpp>
-#else  // Defined __BORLANDC__ .
-#   define BOOST_STATIC_ASSERT(deliberately_ignored) class IgNoRe
-#endif // Defined __BORLANDC__ .
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_base_and_derived.hpp>
 
 #if !defined LMI_MSW
 #   include <cstdio>
diff --git a/any_member.hpp b/any_member.hpp
index 669f11d..4880f42 100644
--- a/any_member.hpp
+++ b/any_member.hpp
@@ -68,13 +68,9 @@
 #include "uncopyable_lmi.hpp"
 #include "value_cast.hpp"
 
-#if !defined __BORLANDC__
-#   include <boost/static_assert.hpp>
-#   include <boost/type_traits/is_base_and_derived.hpp>
-#   include <boost/type_traits/is_same.hpp>
-#else  // defined __BORLANDC__
-#   define BOOST_STATIC_ASSERT(deliberately_ignored) class IgNoRe
-#endif // defined __BORLANDC__
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_base_and_derived.hpp>
+#include <boost/type_traits/is_same.hpp>
 
 #include <algorithm>                    // std::lower_bound(), std::swap()
 #include <map>
diff --git a/callback.hpp b/callback.hpp
index 43b21ef..0f3d5d7 100644
--- a/callback.hpp
+++ b/callback.hpp
@@ -106,11 +106,9 @@ class LMI_SO callback
     :        private lmi::uncopyable <callback<FunctionPointer> >
     ,virtual private obstruct_slicing<callback<FunctionPointer> >
 {
-#if !defined __BORLANDC__
     BOOST_STATIC_ASSERT(boost::is_pointer<FunctionPointer>::value);
     typedef typename boost::remove_pointer<FunctionPointer>::type f_type;
     BOOST_STATIC_ASSERT(boost::is_function<f_type>::value);
-#endif // !defined __BORLANDC__
 
   public:
     FunctionPointer operator()() const;
diff --git a/ieee754.hpp b/ieee754.hpp
index 4b83300..8b2a072 100644
--- a/ieee754.hpp
+++ b/ieee754.hpp
@@ -24,12 +24,8 @@
 
 #include "config.hpp"
 
-#if !defined __BORLANDC__
-#   include <boost/static_assert.hpp>
-#   include <boost/type_traits/is_float.hpp>
-#else  // Defined __BORLANDC__ .
-#   define BOOST_STATIC_ASSERT(deliberately_ignored) class IgNoRe
-#endif // Defined __BORLANDC__ .
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_float.hpp>
 
 #include <limits>
 
diff --git a/math_functors.hpp b/math_functors.hpp
index 2c18768..2a3105e 100644
--- a/math_functors.hpp
+++ b/math_functors.hpp
@@ -27,12 +27,8 @@
 #include "assert_lmi.hpp"
 #include "et_vector.hpp"
 
-#if !defined __BORLANDC__
-#   include <boost/static_assert.hpp>
-#   include <boost/type_traits/is_float.hpp>
-#else  // Defined __BORLANDC__ .
-#   define BOOST_STATIC_ASSERT(deliberately_ignored) class IgNoRe
-#endif // Defined __BORLANDC__ .
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_float.hpp>
 
 #include <algorithm>                    // std::max(), std::min()
 #include <cmath>                        // C99 expm1(), log1p()
diff --git a/numeric_io_cast.hpp b/numeric_io_cast.hpp
index 3004350..9d2c6e1 100644
--- a/numeric_io_cast.hpp
+++ b/numeric_io_cast.hpp
@@ -34,13 +34,9 @@
 #include <string>
 #include <typeinfo>
 
-#if !defined __BORLANDC__
-#   include <boost/static_assert.hpp>
-#   include <boost/type_traits/is_arithmetic.hpp>
-#   include <boost/type_traits/is_void.hpp>
-#else  // defined __BORLANDC__
-#   define BOOST_STATIC_ASSERT(deliberately_ignored) class IgNoRe
-#endif // defined __BORLANDC__
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/type_traits/is_void.hpp>
 
 template<typename To, typename From>
 struct numeric_converter;
diff --git a/numeric_io_test.cpp b/numeric_io_test.cpp
index 518ccac..1af2ae5 100644
--- a/numeric_io_test.cpp
+++ b/numeric_io_test.cpp
@@ -104,12 +104,8 @@ void mete_infinity()
 // These tests generally assume IEC 60559 floating point. Hardware
 // that deviates from that standard is probably so rare that it can
 // reasonably be ignored, with an appropriate runtime message.
-//
-// COMPILER !! The borland compiler through version 5.5.1 reports that
-// its double type doesn't conform to IEC 60559, but that seems wrong.
-#ifndef __BORLANDC__
-    BOOST_STATIC_ASSERT(std::numeric_limits<double>::is_iec559);
-#endif // ! defined __BORLANDC__
+
+BOOST_STATIC_ASSERT(std::numeric_limits<double>::is_iec559);
 
 int test_main(int, char*[])
 {
diff --git a/numeric_io_traits.hpp b/numeric_io_traits.hpp
index a703e29..97da8a6 100644
--- a/numeric_io_traits.hpp
+++ b/numeric_io_traits.hpp
@@ -34,22 +34,9 @@
 #include <stdexcept>
 #include <string>
 
-#if !defined __BORLANDC__
-#   include <boost/cast.hpp>
-#   include <boost/static_assert.hpp>
-#   include <boost/type_traits/is_float.hpp>
-#else  // defined __BORLANDC__
-// COMPILER !! Workarounds for defective borland compiler.
-#   define BOOST_STATIC_ASSERT(deliberately_ignored) class IgNoRe
-namespace boost
-{
-    template<typename T, typename U>
-    T numeric_cast(U u)
-    {
-        return static_cast<T>(u);
-    }
-} // namespace boost
-#endif // defined __BORLANDC__
+#include <boost/cast.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_float.hpp>
 
 /// Number of exact decimal digits to the right of the decimal point.
 ///
diff --git a/round_to.hpp b/round_to.hpp
index 1525717..4f9638a 100644
--- a/round_to.hpp
+++ b/round_to.hpp
@@ -26,12 +26,8 @@
 
 #include "mc_enum_type_enums.hpp"
 
-#if !defined __BORLANDC__
-#   include <boost/static_assert.hpp>
-#   include <boost/type_traits/is_float.hpp>
-#else  // Defined __BORLANDC__ .
-#   define BOOST_STATIC_ASSERT(deliberately_ignored) class IgNoRe
-#endif // Defined __BORLANDC__ .
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_float.hpp>
 
 #include <cmath>
 #include <functional>
diff --git a/safely_dereference_as.hpp b/safely_dereference_as.hpp
index ae7c80f..016ff3b 100644
--- a/safely_dereference_as.hpp
+++ b/safely_dereference_as.hpp
@@ -26,13 +26,9 @@
 
 #include "rtti_lmi.hpp"
 
-#if !defined __BORLANDC__
-#   include <boost/static_assert.hpp>
-#   include <boost/type_traits/is_base_and_derived.hpp>
-#   include <boost/type_traits/is_same.hpp>
-#else  // Defined __BORLANDC__ .
-#   define BOOST_STATIC_ASSERT(deliberately_ignored) class IgNoRe
-#endif // Defined __BORLANDC__ .
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_base_and_derived.hpp>
+#include <boost/type_traits/is_same.hpp>
 
 #include <sstream>
 #include <stdexcept>
diff --git a/stream_cast.hpp b/stream_cast.hpp
index 45c3568..281f6a5 100644
--- a/stream_cast.hpp
+++ b/stream_cast.hpp
@@ -49,13 +49,9 @@
 #include "facets.hpp"
 #include "rtti_lmi.hpp"
 
-#if !defined __BORLANDC__
-#   include <boost/static_assert.hpp>
-#   include <boost/type_traits/is_arithmetic.hpp>
-#   include <boost/type_traits/is_pointer.hpp>
-#else  // defined __BORLANDC__
-#   define BOOST_STATIC_ASSERT(deliberately_ignored) class IgNoRe
-#endif // defined __BORLANDC__
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/type_traits/is_pointer.hpp>
 
 #include <istream>                      // std::ws
 #include <sstream>
@@ -104,13 +100,12 @@
 template<typename To, typename From>
 To stream_cast(From from, To = To())
 {
-#if !defined __BORLANDC__
     BOOST_STATIC_ASSERT
         (   !boost::is_arithmetic<From>::value
         ||  !boost::is_arithmetic<To  >::value
         );
     BOOST_STATIC_ASSERT(!boost::is_pointer   <To  >::value);
-#endif // !defined __BORLANDC__
+
     std::stringstream interpreter;
     std::ostringstream err;
     To result = To();
@@ -206,16 +201,5 @@ inline std::string stream_cast<std::string>
     return from;
 }
 
-#if defined __BORLANDC__
-// COMPILER !! Work around borland defect.
-inline std::string stream_cast
-    (std::string from
-    ,std::string
-    )
-{
-    return from;
-}
-#endif // defined __BORLANDC__
-
 #endif // stream_cast_hpp
 
diff --git a/tn_range.hpp b/tn_range.hpp
index 631ea7a..3f16f7f 100644
--- a/tn_range.hpp
+++ b/tn_range.hpp
@@ -28,12 +28,8 @@
 
 #include <boost/operators.hpp>
 
-#if !defined __BORLANDC__
-#   include <boost/static_assert.hpp>
-#   include <boost/type_traits/is_base_and_derived.hpp>
-#else  // Defined __BORLANDC__ .
-#   define BOOST_STATIC_ASSERT(deliberately_ignored) class IgNoRe
-#endif // Defined __BORLANDC__ .
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_base_and_derived.hpp>
 
 #include <string>
 #include <typeinfo>
diff --git a/tn_range_type_trammels.hpp b/tn_range_type_trammels.hpp
index 3cdac3d..021609f 100644
--- a/tn_range_type_trammels.hpp
+++ b/tn_range_type_trammels.hpp
@@ -28,12 +28,8 @@
 
 #include "calendar_date.hpp"
 
-#if !defined __BORLANDC__
-#   include <boost/static_assert.hpp>
-#   include <boost/type_traits/is_same.hpp>
-#else  // Defined __BORLANDC__ .
-#   define BOOST_STATIC_ASSERT(deliberately_ignored) class IgNoRe
-#endif // Defined __BORLANDC__ .
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_same.hpp>
 
 #include <limits>
 
diff --git a/uncopyable_lmi.hpp b/uncopyable_lmi.hpp
index 1786b35..fc1fc06 100644
--- a/uncopyable_lmi.hpp
+++ b/uncopyable_lmi.hpp
@@ -22,12 +22,8 @@
 
 #include "config.hpp"
 
-#if !defined __BORLANDC__
-#   include <boost/static_assert.hpp>
-#   include <boost/type_traits/is_base_and_derived.hpp>
-#else  // Defined __BORLANDC__ .
-#   define BOOST_STATIC_ASSERT(deliberately_ignored) class IgNoRe
-#endif // Defined __BORLANDC__ .
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_base_and_derived.hpp>
 
 /// Forbid compiler to generate copy and assignment functions.
 ///
diff --git a/value_cast.hpp b/value_cast.hpp
index 408be3c..97c72b4 100644
--- a/value_cast.hpp
+++ b/value_cast.hpp
@@ -27,8 +27,6 @@
 #include "numeric_io_cast.hpp"
 #include "stream_cast.hpp"
 
-#if !defined __BORLANDC__
-
 #include <boost/cast.hpp>
 #include <boost/type_traits/is_arithmetic.hpp>
 #include <boost/type_traits/is_convertible.hpp>
@@ -262,24 +260,5 @@ To value_cast(From const& from, To)
     return value_cast<To,From>(from);
 }
 
-#else // defined __BORLANDC__
-
-// COMPILER !! It's not worth working around borland defects: they are
-// legion. Don't rely on these casts to DTRT with borland tools.
-
-template<typename To, typename From>
-To value_cast(From const& from, To = To())
-{
-    return stream_cast<To>(from);
-}
-
-template<typename To, typename From>
-To numeric_value_cast(From const& from)
-{
-    return static_cast<To>(from);
-}
-
-#endif // defined __BORLANDC__
-
 #endif // value_cast_hpp
 



reply via email to

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