Test the standard library rather than the compiler to select the standard header for std::swap.

This commit is contained in:
Andrey Semashev
2020-05-21 02:04:43 +03:00
parent 9c33851420
commit 2b102e7357

View File

@ -23,12 +23,12 @@
#include <boost/core/enable_if.hpp> #include <boost/core/enable_if.hpp>
#include <boost/config.hpp> #include <boost/config.hpp>
#if __cplusplus >= 201103L || defined(BOOST_MSVC) #if __cplusplus >= 201103L || defined(BOOST_DINKUMWARE_STDLIB)
#include <utility> //for std::swap (C++11) #include <utility> // for std::swap (C++11)
#else #else
#include <algorithm> //for std::swap (C++98) #include <algorithm> // for std::swap (C++98)
#endif #endif
#include <cstddef> //for std::size_t #include <cstddef> // for std::size_t
namespace boost_swap_impl namespace boost_swap_impl
{ {