diff --git a/include/boost/move/adl_move_swap.hpp b/include/boost/move/adl_move_swap.hpp index a3373a1..4053ae5 100644 --- a/include/boost/move/adl_move_swap.hpp +++ b/include/boost/move/adl_move_swap.hpp @@ -25,10 +25,12 @@ //Try to avoid including , as it's quite big #if defined(_MSC_VER) && defined(BOOST_DINKUMWARE_STDLIB) #include //Dinkum libraries define std::swap in utility which is lighter than algorithm -#elif defined(BOOST_GCC) && defined(BOOST_GNU_STDLIB) - #if (__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 3)) - #include //algobase is lighter than - #elif ((__GNUC__ == 4) && (__GNUC_MINOR__ == 3)) +#elif defined(BOOST_GNU_STDLIB) + //For non-GCC compilers, where GNUC version is not very reliable, or old GCC versions + //use the good old stl_algobase header, which is quite lightweight + #if !defined(BOOST_GCC) || ((__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 3))) + #include + #elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3) //In GCC 4.3 a tiny stl_move.h was created with swap and move utilities #include #else @@ -37,8 +39,10 @@ #endif #elif defined(_LIBCPP_VERSION) #include //The initial import of libc++ defines std::swap and still there -#else //Fallback - #include +#elif __cplusplus >= 201103L + #include //Fallback for C++ >= 2011 +#else + #include //Fallback for C++98/03 #endif #include //for boost::move