diff --git a/include/boost/move/detail/iterator_traits.hpp b/include/boost/move/detail/iterator_traits.hpp index d84c4f5..a75ee03 100644 --- a/include/boost/move/detail/iterator_traits.hpp +++ b/include/boost/move/detail/iterator_traits.hpp @@ -24,20 +24,7 @@ #include -#if defined(__clang__) - #define BOOST_MOVE_CLANG_INLINE_STD_NS - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wc++11-extensions" -#endif - -#ifdef _LIBCPP_VERSION - #define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD - #define BOOST_MOVE_STD_NS_END _LIBCPP_END_NAMESPACE_STD -#else - #define BOOST_MOVE_STD_NS_BEG namespace std{ - #define BOOST_MOVE_STD_NS_END } -#endif - +#include BOOST_MOVE_STD_NS_BEG struct input_iterator_tag; @@ -47,11 +34,7 @@ struct random_access_iterator_tag; struct output_iterator_tag; BOOST_MOVE_STD_NS_END - -#ifdef BOOST_MOVE_CLANG_INLINE_STD_NS - #pragma GCC diagnostic pop - #undef BOOST_MOVE_CLANG_INLINE_STD_NS -#endif //BOOST_MOVE_CLANG_INLINE_STD_NS +#include namespace boost{ namespace movelib{ diff --git a/include/boost/move/detail/std_ns_begin.hpp b/include/boost/move/detail/std_ns_begin.hpp new file mode 100644 index 0000000..a768e61 --- /dev/null +++ b/include/boost/move/detail/std_ns_begin.hpp @@ -0,0 +1,30 @@ +#////////////////////////////////////////////////////////////////////////////// +#// +#// (C) Copyright Ion Gaztanaga 2015-2015. +#// Distributed under the Boost Software License, Version 1.0. +#// (See accompanying file LICENSE_1_0.txt or copy at +#// http://www.boost.org/LICENSE_1_0.txt) +#// +#// See http://www.boost.org/libs/move for documentation. +#// +#////////////////////////////////////////////////////////////////////////////// +# +#if defined(_LIBCPP_VERSION) + #if defined(__clang__) + #define BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wc++11-extensions" + #endif + #define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD + #define BOOST_MOVE_STD_NS_END _LIBCPP_END_NAMESPACE_STD +#elif defined(BOOST_GNU_STDLIB) && defined(_GLIBCXX_BEGIN_NAMESPACE_VERSION) //GCC >= 4.6 + #define BOOST_MOVE_STD_NS_BEG namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION + #define BOOST_MOVE_STD_NS_END _GLIBCXX_END_NAMESPACE_VERSION } // namespace +#elif defined(BOOST_GNU_STDLIB) && defined(_GLIBCXX_BEGIN_NAMESPACE) //GCC >= 4.2 + #define BOOST_MOVE_STD_NS_BEG _GLIBCXX_BEGIN_NAMESPACE(std) + #define BOOST_MOVE_STD_NS_END _GLIBCXX_END_NAMESPACE +#else + #define BOOST_MOVE_STD_NS_BEG namespace std{ + #define BOOST_MOVE_STD_NS_END } +#endif + diff --git a/include/boost/move/detail/std_ns_end.hpp b/include/boost/move/detail/std_ns_end.hpp new file mode 100644 index 0000000..0975059 --- /dev/null +++ b/include/boost/move/detail/std_ns_end.hpp @@ -0,0 +1,14 @@ +#////////////////////////////////////////////////////////////////////////////// +#// +#// (C) Copyright Ion Gaztanaga 2015-2015. +#// Distributed under the Boost Software License, Version 1.0. +#// (See accompanying file LICENSE_1_0.txt or copy at +#// http://www.boost.org/LICENSE_1_0.txt) +#// +#// See http://www.boost.org/libs/move for documentation. +#// +#////////////////////////////////////////////////////////////////////////////// +#ifdef BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH + #pragma GCC diagnostic pop + #undef BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH +#endif //BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH diff --git a/proj/vc7ide/Move.sln b/proj/vc7ide/Move.sln index 06e5cc9..a38b5f8 100644 --- a/proj/vc7ide/Move.sln +++ b/proj/vc7ide/Move.sln @@ -249,6 +249,7 @@ Global ..\..\..\..\boost\move\move.hpp = ..\..\..\..\boost\move\move.hpp ..\..\doc\move.qbk = ..\..\doc\move.qbk ..\..\..\..\boost\move\detail\move_helpers.hpp = ..\..\..\..\boost\move\detail\move_helpers.hpp + ..\..\..\..\boost\move\detail\std_ns_begin.hpp = ..\..\..\..\boost\move\detail\std_ns_begin.hpp ..\..\..\..\boost\move\traits.hpp = ..\..\..\..\boost\move\traits.hpp ..\..\..\..\boost\move\detail\type_traits.hpp = ..\..\..\..\boost\move\detail\type_traits.hpp ..\..\..\..\boost\move\unique_ptr.hpp = ..\..\..\..\boost\move\unique_ptr.hpp