mirror of
https://github.com/boostorg/move.git
synced 2025-08-02 21:54:26 +02:00
Use stl_algobase.h for ICC and Clang compilers using libstdc++
This commit is contained in:
@@ -25,10 +25,12 @@
|
|||||||
//Try to avoid including <algorithm>, as it's quite big
|
//Try to avoid including <algorithm>, as it's quite big
|
||||||
#if defined(_MSC_VER) && defined(BOOST_DINKUMWARE_STDLIB)
|
#if defined(_MSC_VER) && defined(BOOST_DINKUMWARE_STDLIB)
|
||||||
#include <utility> //Dinkum libraries define std::swap in utility which is lighter than algorithm
|
#include <utility> //Dinkum libraries define std::swap in utility which is lighter than algorithm
|
||||||
#elif defined(BOOST_GCC) && defined(BOOST_GNU_STDLIB)
|
#elif defined(BOOST_GNU_STDLIB)
|
||||||
#if (__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 3))
|
//For non-GCC compilers, where GNUC version is not very reliable, or old GCC versions
|
||||||
#include <bits/stl_algobase.h> //algobase is lighter than <algorithm>
|
//use the good old stl_algobase header, which is quite lightweight
|
||||||
#elif ((__GNUC__ == 4) && (__GNUC_MINOR__ == 3))
|
#if !defined(BOOST_GCC) || ((__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 3)))
|
||||||
|
#include <bits/stl_algobase.h>
|
||||||
|
#elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
|
||||||
//In GCC 4.3 a tiny stl_move.h was created with swap and move utilities
|
//In GCC 4.3 a tiny stl_move.h was created with swap and move utilities
|
||||||
#include <bits/stl_move.h>
|
#include <bits/stl_move.h>
|
||||||
#else
|
#else
|
||||||
@@ -37,8 +39,10 @@
|
|||||||
#endif
|
#endif
|
||||||
#elif defined(_LIBCPP_VERSION)
|
#elif defined(_LIBCPP_VERSION)
|
||||||
#include <type_traits> //The initial import of libc++ defines std::swap and still there
|
#include <type_traits> //The initial import of libc++ defines std::swap and still there
|
||||||
#else //Fallback
|
#elif __cplusplus >= 201103L
|
||||||
#include <algorithm>
|
#include <utility> //Fallback for C++ >= 2011
|
||||||
|
#else
|
||||||
|
#include <algorithm> //Fallback for C++98/03
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/move/utility_core.hpp> //for boost::move
|
#include <boost/move/utility_core.hpp> //for boost::move
|
||||||
|
Reference in New Issue
Block a user