mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 14:04:26 +02:00
Define insert_iterator specialization in inline namespace std in libc++.
This commit is contained in:
@@ -1638,12 +1638,18 @@ namespace container {
|
|||||||
|
|
||||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||||
|
|
||||||
//Ummm, I don't like to define things in namespace std, but
|
#if defined(__clang__) && defined(_LIBCPP_VERSION)
|
||||||
//there is no other way
|
#define BOOST_CONTAINER_CLANG_INLINE_STD_NS
|
||||||
namespace std {
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wc++11-extensions"
|
||||||
|
#define BOOST_CONTAINER_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
|
||||||
|
#define BOOST_CONTAINER_STD_NS_END _LIBCPP_END_NAMESPACE_STD
|
||||||
|
#else
|
||||||
|
#define BOOST_CONTAINER_STD_NS_BEG namespace std{
|
||||||
|
#define BOOST_CONTAINER_STD_NS_END }
|
||||||
|
#endif
|
||||||
|
|
||||||
template <class T>
|
BOOST_CONTAINER_STD_NS_BEG
|
||||||
class insert_iterator;
|
|
||||||
|
|
||||||
template <class T, class Allocator>
|
template <class T, class Allocator>
|
||||||
class insert_iterator<boost::container::slist<T, Allocator> >
|
class insert_iterator<boost::container::slist<T, Allocator> >
|
||||||
@@ -1676,7 +1682,12 @@ class insert_iterator<boost::container::slist<T, Allocator> >
|
|||||||
insert_iterator<Container>& operator++(int){ return *this; }
|
insert_iterator<Container>& operator++(int){ return *this; }
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace std;
|
BOOST_CONTAINER_STD_NS_END
|
||||||
|
|
||||||
|
#ifdef BOOST_CONTAINER_CLANG_INLINE_STD_NS
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#undef BOOST_CONTAINER_CLANG_INLINE_STD_NS
|
||||||
|
#endif //BOOST_CONTAINER_CLANG_INLINE_STD_NS
|
||||||
|
|
||||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user