From 8ae858cc797263c1479a6eb356178b1a1384e9cb Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Wed, 31 Jan 2001 18:28:51 +0000 Subject: [PATCH] rolled back g++ fix, since it didn't work [SVN r8832] --- include/boost/detail/type_traits.hpp | 43 +--------------------------- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/include/boost/detail/type_traits.hpp b/include/boost/detail/type_traits.hpp index 778abd2..f171ab1 100644 --- a/include/boost/detail/type_traits.hpp +++ b/include/boost/detail/type_traits.hpp @@ -10,8 +10,6 @@ // see libs/utility/type_traits.htm /* Release notes: - 31 Jan 2001: - Fixes for is_convertible with g++. (Jeremy Siek) 21 Jan 2001: Fixed tests for long long to detect its presence on GCC (David Abrahams) 03 Oct 2000: @@ -470,51 +468,13 @@ template struct is_POD // // is one type convertable to another? -#if defined(__GNUC__) -template -struct is_convertible_dispatch { - typedef char (&no)[1]; - typedef char (&yes)[2]; - template - struct checker { - static no check(...); - static yes check(T); - }; - static From from; - static const bool value = sizeof( checker::check(from) ) == sizeof(yes); -}; -template -struct is_convertible_dispatch { - typedef char (&no)[1]; - typedef char (&yes)[2]; - template - struct checker { - static no check(void*); - static yes check(T*); - }; - static From from; - static const bool value = sizeof( checker::check(&from) ) == sizeof(yes); -}; - -template -struct is_convertible -{ -private: - typedef is_convertible_dispatch::value - || !BOOST_IS_CLASS(From) || is_reference::value, From, To> Dispatch; -public: - static const bool value = Dispatch::value; -}; - -#else // not __GNUC__ - template struct is_convertible { private: typedef char (&no)[1]; typedef char (&yes)[2]; -# if defined(__BORLANDC__) +# if defined(__BORLANDC__) || defined(__GNUC__) // This workaround for Borland breaks the EDG C++ frontend, // so we only use it for Borland. template @@ -535,7 +495,6 @@ public: # endif void foo(); // avoid warning about all members being private }; -#endif // not __GNUC__ template struct is_convertible