diff --git a/include/boost/iterator/iterator_adaptors.hpp b/include/boost/iterator/iterator_adaptors.hpp index 3ebded2..f81ff4d 100644 --- a/include/boost/iterator/iterator_adaptors.hpp +++ b/include/boost/iterator/iterator_adaptors.hpp @@ -14,6 +14,10 @@ #include "boost/type_traits/detail/bool_trait_def.hpp" +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1301) || BOOST_WORKAROUND(__GNUC__, <= 2 && __GNUC_MINOR__ <= 95) || BOOST_WORKAROUND(__MWERKS__, <= 0x3000) +# define BOOST_NO_SFINAE // "Substitution Failure Is Not An Error not implemented" +#endif + namespace boost { namespace detail { @@ -34,7 +38,7 @@ namespace boost { template struct base { -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +#ifdef BOOST_NO_SFINAE // Disable enable if for MSVC typedef T type; @@ -563,7 +567,8 @@ namespace boost { struct has_element_type : mpl::if_< is_class -# if __GNUC__ == 2 // gcc 2.95 doesn't seem to be able to detect element_type without barfing +// gcc 2.95 doesn't seem to be able to detect element_type without barfing +# if BOOST_WORKAROUND(__GNUC__, == 2 && __GNUC_MINOR__ == 95) , mpl::bool_c # else , aux::has_element_type diff --git a/test/indirect_iterator_test.cpp b/test/indirect_iterator_test.cpp index e66ba9d..1a6595f 100644 --- a/test/indirect_iterator_test.cpp +++ b/test/indirect_iterator_test.cpp @@ -18,9 +18,13 @@ #include #include #include + +#include + #include #include #include + #include #include #include @@ -87,8 +91,9 @@ void more_indirect_iterator_tests() // Older Dinkumware and GCC standard lib don't supply symmetric constant/mutable // iterator operators -#if !defined(BOOST_MSVC_STD_ITERATOR) && (!defined(_CPPLIB_VER) || _CPPLIB_VER > 310) \ - && (__GNUC__ != 2 || defined(__SGI_STL_PORT)) +#if !defined(BOOST_MSVC_STD_ITERATOR) \ + && !BOOST_WORKAROUND(_CPPLIB_VER, <= 310) \ + && !BOOST_WORKAROUND(__GNUC__, <= 2 && !defined(__SGI_STL_PORT)) assert(db == dci);