Update to boost 1.66

This commit is contained in:
MerryMage 2018-01-01 20:31:13 +00:00
parent 9ffbf897dc
commit d80e506e17
203 changed files with 14820 additions and 2478 deletions

View file

@ -2122,21 +2122,31 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
#define BOOST_BIND_CC #define BOOST_BIND_CC
#define BOOST_BIND_ST #define BOOST_BIND_ST
#define BOOST_BIND_NOEXCEPT
#include <boost/bind/bind_cc.hpp> #include <boost/bind/bind_cc.hpp>
# ifdef __cpp_noexcept_function_type
# undef BOOST_BIND_NOEXCEPT
# define BOOST_BIND_NOEXCEPT noexcept
# include <boost/bind/bind_cc.hpp>
# endif
#undef BOOST_BIND_CC #undef BOOST_BIND_CC
#undef BOOST_BIND_ST #undef BOOST_BIND_ST
#undef BOOST_BIND_NOEXCEPT
#ifdef BOOST_BIND_ENABLE_STDCALL #ifdef BOOST_BIND_ENABLE_STDCALL
#define BOOST_BIND_CC __stdcall #define BOOST_BIND_CC __stdcall
#define BOOST_BIND_ST #define BOOST_BIND_ST
#define BOOST_BIND_NOEXCEPT
#include <boost/bind/bind_cc.hpp> #include <boost/bind/bind_cc.hpp>
#undef BOOST_BIND_CC #undef BOOST_BIND_CC
#undef BOOST_BIND_ST #undef BOOST_BIND_ST
#undef BOOST_BIND_NOEXCEPT
#endif #endif
@ -2144,11 +2154,13 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
#define BOOST_BIND_CC __fastcall #define BOOST_BIND_CC __fastcall
#define BOOST_BIND_ST #define BOOST_BIND_ST
#define BOOST_BIND_NOEXCEPT
#include <boost/bind/bind_cc.hpp> #include <boost/bind/bind_cc.hpp>
#undef BOOST_BIND_CC #undef BOOST_BIND_CC
#undef BOOST_BIND_ST #undef BOOST_BIND_ST
#undef BOOST_BIND_NOEXCEPT
#endif #endif
@ -2156,11 +2168,13 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
#define BOOST_BIND_ST pascal #define BOOST_BIND_ST pascal
#define BOOST_BIND_CC #define BOOST_BIND_CC
#define BOOST_BIND_NOEXCEPT
#include <boost/bind/bind_cc.hpp> #include <boost/bind/bind_cc.hpp>
#undef BOOST_BIND_ST #undef BOOST_BIND_ST
#undef BOOST_BIND_CC #undef BOOST_BIND_CC
#undef BOOST_BIND_NOEXCEPT
#endif #endif
@ -2168,23 +2182,33 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
#define BOOST_BIND_MF_NAME(X) X #define BOOST_BIND_MF_NAME(X) X
#define BOOST_BIND_MF_CC #define BOOST_BIND_MF_CC
#define BOOST_BIND_MF_NOEXCEPT
#include <boost/bind/bind_mf_cc.hpp> #include <boost/bind/bind_mf_cc.hpp>
#include <boost/bind/bind_mf2_cc.hpp> #include <boost/bind/bind_mf2_cc.hpp>
# ifdef __cpp_noexcept_function_type
# undef BOOST_BIND_MF_NOEXCEPT
# define BOOST_BIND_MF_NOEXCEPT noexcept
# include <boost/bind/bind_mf_cc.hpp>
# endif
#undef BOOST_BIND_MF_NAME #undef BOOST_BIND_MF_NAME
#undef BOOST_BIND_MF_CC #undef BOOST_BIND_MF_CC
#undef BOOST_BIND_MF_NOEXCEPT
#ifdef BOOST_MEM_FN_ENABLE_CDECL #ifdef BOOST_MEM_FN_ENABLE_CDECL
#define BOOST_BIND_MF_NAME(X) X##_cdecl #define BOOST_BIND_MF_NAME(X) X##_cdecl
#define BOOST_BIND_MF_CC __cdecl #define BOOST_BIND_MF_CC __cdecl
#define BOOST_BIND_MF_NOEXCEPT
#include <boost/bind/bind_mf_cc.hpp> #include <boost/bind/bind_mf_cc.hpp>
#include <boost/bind/bind_mf2_cc.hpp> #include <boost/bind/bind_mf2_cc.hpp>
#undef BOOST_BIND_MF_NAME #undef BOOST_BIND_MF_NAME
#undef BOOST_BIND_MF_CC #undef BOOST_BIND_MF_CC
#undef BOOST_BIND_MF_NOEXCEPT
#endif #endif
@ -2192,12 +2216,14 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
#define BOOST_BIND_MF_NAME(X) X##_stdcall #define BOOST_BIND_MF_NAME(X) X##_stdcall
#define BOOST_BIND_MF_CC __stdcall #define BOOST_BIND_MF_CC __stdcall
#define BOOST_BIND_MF_NOEXCEPT
#include <boost/bind/bind_mf_cc.hpp> #include <boost/bind/bind_mf_cc.hpp>
#include <boost/bind/bind_mf2_cc.hpp> #include <boost/bind/bind_mf2_cc.hpp>
#undef BOOST_BIND_MF_NAME #undef BOOST_BIND_MF_NAME
#undef BOOST_BIND_MF_CC #undef BOOST_BIND_MF_CC
#undef BOOST_BIND_MF_NOEXCEPT
#endif #endif
@ -2205,12 +2231,14 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
#define BOOST_BIND_MF_NAME(X) X##_fastcall #define BOOST_BIND_MF_NAME(X) X##_fastcall
#define BOOST_BIND_MF_CC __fastcall #define BOOST_BIND_MF_CC __fastcall
#define BOOST_BIND_MF_NOEXCEPT
#include <boost/bind/bind_mf_cc.hpp> #include <boost/bind/bind_mf_cc.hpp>
#include <boost/bind/bind_mf2_cc.hpp> #include <boost/bind/bind_mf2_cc.hpp>
#undef BOOST_BIND_MF_NAME #undef BOOST_BIND_MF_NAME
#undef BOOST_BIND_MF_CC #undef BOOST_BIND_MF_CC
#undef BOOST_BIND_MF_NOEXCEPT
#endif #endif
@ -2264,6 +2292,15 @@ template< class R, class T > struct add_cref< R (T::*) () const, 1 >
typedef void type; typedef void type;
}; };
#ifdef __cpp_noexcept_function_type
template< class R, class T > struct add_cref< R (T::*) () const noexcept, 1 >
{
typedef void type;
};
#endif // __cpp_noexcept_function_type
#endif // __IBMCPP__ #endif // __IBMCPP__
template<class R> struct isref template<class R> struct isref

View file

@ -13,28 +13,28 @@
// //
template<class R> template<class R>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (), _bi::list0> _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) () BOOST_BIND_NOEXCEPT, _bi::list0>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) ()) BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) () BOOST_BIND_NOEXCEPT)
{ {
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (); typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) () BOOST_BIND_NOEXCEPT;
typedef _bi::list0 list_type; typedef _bi::list0 list_type;
return _bi::bind_t<R, F, list_type> (f, list_type()); return _bi::bind_t<R, F, list_type> (f, list_type());
} }
template<class R, class B1, class A1> template<class R, class B1, class A1>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1), typename _bi::list_av_1<A1>::type> _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1) BOOST_BIND_NOEXCEPT, typename _bi::list_av_1<A1>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1), A1 a1) BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1) BOOST_BIND_NOEXCEPT, A1 a1)
{ {
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1); typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_1<A1>::type list_type; typedef typename _bi::list_av_1<A1>::type list_type;
return _bi::bind_t<R, F, list_type> (f, list_type(a1)); return _bi::bind_t<R, F, list_type> (f, list_type(a1));
} }
template<class R, class B1, class B2, class A1, class A2> template<class R, class B1, class B2, class A1, class A2>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2), typename _bi::list_av_2<A1, A2>::type> _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2) BOOST_BIND_NOEXCEPT, typename _bi::list_av_2<A1, A2>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2), A1 a1, A2 a2) BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2)
{ {
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2); typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_2<A1, A2>::type list_type; typedef typename _bi::list_av_2<A1, A2>::type list_type;
return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2)); return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2));
} }
@ -42,10 +42,10 @@ template<class R, class B1, class B2, class A1, class A2>
template<class R, template<class R,
class B1, class B2, class B3, class B1, class B2, class B3,
class A1, class A2, class A3> class A1, class A2, class A3>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3), typename _bi::list_av_3<A1, A2, A3>::type> _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3) BOOST_BIND_NOEXCEPT, typename _bi::list_av_3<A1, A2, A3>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3) BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3)
{ {
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3); typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type; typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3)); return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
} }
@ -53,10 +53,10 @@ template<class R,
template<class R, template<class R,
class B1, class B2, class B3, class B4, class B1, class B2, class B3, class B4,
class A1, class A2, class A3, class A4> class A1, class A2, class A3, class A4>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4), typename _bi::list_av_4<A1, A2, A3, A4>::type> _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4) BOOST_BIND_NOEXCEPT, typename _bi::list_av_4<A1, A2, A3, A4>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4) BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
{ {
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4); typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type; typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4)); return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4));
} }
@ -64,10 +64,10 @@ template<class R,
template<class R, template<class R,
class B1, class B2, class B3, class B4, class B5, class B1, class B2, class B3, class B4, class B5,
class A1, class A2, class A3, class A4, class A5> class A1, class A2, class A3, class A4, class A5>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5), typename _bi::list_av_5<A1, A2, A3, A4, A5>::type> _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5) BOOST_BIND_NOEXCEPT, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
{ {
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5); typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type; typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5)); return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
} }
@ -75,10 +75,10 @@ template<class R,
template<class R, template<class R,
class B1, class B2, class B3, class B4, class B5, class B6, class B1, class B2, class B3, class B4, class B5, class B6,
class A1, class A2, class A3, class A4, class A5, class A6> class A1, class A2, class A3, class A4, class A5, class A6>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6), typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type> _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6) BOOST_BIND_NOEXCEPT, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
{ {
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6); typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type; typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6)); return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
} }
@ -86,10 +86,10 @@ template<class R,
template<class R, template<class R,
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B1, class B2, class B3, class B4, class B5, class B6, class B7,
class A1, class A2, class A3, class A4, class A5, class A6, class A7> class A1, class A2, class A3, class A4, class A5, class A6, class A7>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7), typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type> _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_NOEXCEPT, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
{ {
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7); typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type; typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7)); return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
} }
@ -97,10 +97,10 @@ template<class R,
template<class R, template<class R,
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8), typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type> _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_NOEXCEPT, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
{ {
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8); typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type; typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
} }
@ -108,10 +108,10 @@ template<class R,
template<class R, template<class R,
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8, class B9, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8, class B9,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8, B9), typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type> _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8, B9) BOOST_BIND_NOEXCEPT, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
{ {
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9); typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type; typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
} }

View file

@ -17,7 +17,7 @@
template<class R, class T, template<class R, class T,
class A1> class A1>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () BOOST_BIND_MF_NOEXCEPT, A1 a1)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F; typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F;
typedef typename _bi::list_av_1<A1>::type list_type; typedef typename _bi::list_av_1<A1>::type list_type;
@ -27,7 +27,7 @@ template<class R, class T,
template<class R, class T, template<class R, class T,
class A1> class A1>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F;
typedef typename _bi::list_av_1<A1>::type list_type; typedef typename _bi::list_av_1<A1>::type list_type;
@ -38,7 +38,7 @@ template<class Rt2, class R, class T,
class A1> class A1>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () BOOST_BIND_MF_NOEXCEPT, A1 a1)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F; typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F;
typedef typename _bi::list_av_1<A1>::type list_type; typedef typename _bi::list_av_1<A1>::type list_type;
@ -49,7 +49,7 @@ template<class Rt2, class R, class T,
class A1> class A1>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F;
typedef typename _bi::list_av_1<A1>::type list_type; typedef typename _bi::list_av_1<A1>::type list_type;
@ -62,7 +62,7 @@ template<class R, class T,
class B1, class B1,
class A1, class A2> class A1, class A2>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F; typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
typedef typename _bi::list_av_2<A1, A2>::type list_type; typedef typename _bi::list_av_2<A1, A2>::type list_type;
@ -73,7 +73,7 @@ template<class R, class T,
class B1, class B1,
class A1, class A2> class A1, class A2>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
typedef typename _bi::list_av_2<A1, A2>::type list_type; typedef typename _bi::list_av_2<A1, A2>::type list_type;
@ -85,7 +85,7 @@ template<class Rt2, class R, class T,
class A1, class A2> class A1, class A2>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F; typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
typedef typename _bi::list_av_2<A1, A2>::type list_type; typedef typename _bi::list_av_2<A1, A2>::type list_type;
@ -97,7 +97,7 @@ template<class Rt2, class R, class T,
class A1, class A2> class A1, class A2>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
typedef typename _bi::list_av_2<A1, A2>::type list_type; typedef typename _bi::list_av_2<A1, A2>::type list_type;
@ -110,7 +110,7 @@ template<class R, class T,
class B1, class B2, class B1, class B2,
class A1, class A2, class A3> class A1, class A2, class A3>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F; typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type; typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
@ -121,7 +121,7 @@ template<class R, class T,
class B1, class B2, class B1, class B2,
class A1, class A2, class A3> class A1, class A2, class A3>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type; typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
@ -133,7 +133,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3> class A1, class A2, class A3>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F; typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type; typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
@ -145,7 +145,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3> class A1, class A2, class A3>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type; typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
@ -158,7 +158,7 @@ template<class R, class T,
class B1, class B2, class B3, class B1, class B2, class B3,
class A1, class A2, class A3, class A4> class A1, class A2, class A3, class A4>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F; typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F;
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type; typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
@ -169,7 +169,7 @@ template<class R, class T,
class B1, class B2, class B3, class B1, class B2, class B3,
class A1, class A2, class A3, class A4> class A1, class A2, class A3, class A4>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F;
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type; typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
@ -181,7 +181,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4> class A1, class A2, class A3, class A4>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F; typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F;
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type; typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
@ -193,7 +193,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4> class A1, class A2, class A3, class A4>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F;
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type; typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
@ -206,7 +206,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B1, class B2, class B3, class B4,
class A1, class A2, class A3, class A4, class A5> class A1, class A2, class A3, class A4, class A5>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F; typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F;
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type; typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
@ -217,7 +217,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B1, class B2, class B3, class B4,
class A1, class A2, class A3, class A4, class A5> class A1, class A2, class A3, class A4, class A5>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F;
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type; typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
@ -229,7 +229,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5> class A1, class A2, class A3, class A4, class A5>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F; typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F;
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type; typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
@ -241,7 +241,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5> class A1, class A2, class A3, class A4, class A5>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F;
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type; typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
@ -254,7 +254,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5, class B1, class B2, class B3, class B4, class B5,
class A1, class A2, class A3, class A4, class A5, class A6> class A1, class A2, class A3, class A4, class A5, class A6>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F; typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F;
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type; typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
@ -265,7 +265,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5, class B1, class B2, class B3, class B4, class B5,
class A1, class A2, class A3, class A4, class A5, class A6> class A1, class A2, class A3, class A4, class A5, class A6>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F;
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type; typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
@ -277,7 +277,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6> class A1, class A2, class A3, class A4, class A5, class A6>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F; typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F;
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type; typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
@ -289,7 +289,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6> class A1, class A2, class A3, class A4, class A5, class A6>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F;
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type; typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
@ -302,7 +302,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6, class B1, class B2, class B3, class B4, class B5, class B6,
class A1, class A2, class A3, class A4, class A5, class A6, class A7> class A1, class A2, class A3, class A4, class A5, class A6, class A7>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F; typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F;
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type; typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
@ -313,7 +313,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6, class B1, class B2, class B3, class B4, class B5, class B6,
class A1, class A2, class A3, class A4, class A5, class A6, class A7> class A1, class A2, class A3, class A4, class A5, class A6, class A7>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F;
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type; typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
@ -325,7 +325,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6, class A7> class A1, class A2, class A3, class A4, class A5, class A6, class A7>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F; typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F;
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type; typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
@ -337,7 +337,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6, class A7> class A1, class A2, class A3, class A4, class A5, class A6, class A7>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F;
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type; typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
@ -350,7 +350,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B1, class B2, class B3, class B4, class B5, class B6, class B7,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F; typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type; typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
@ -361,7 +361,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B1, class B2, class B3, class B4, class B5, class B6, class B7,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type; typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
@ -373,7 +373,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F; typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type; typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
@ -385,7 +385,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type; typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
@ -398,7 +398,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F; typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type; typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
@ -409,7 +409,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type> _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type; typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
@ -421,7 +421,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F; typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type; typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
@ -433,7 +433,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value, typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type> _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
{ {
typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F; typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type; typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;

View file

@ -32,7 +32,7 @@
// if we don't have a compiler config set, try and find one: // if we don't have a compiler config set, try and find one:
#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG) #if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG)
# include <boost/config/select_compiler_config.hpp> # include <boost/config/detail/select_compiler_config.hpp>
#endif #endif
// if we have a compiler config, include it now: // if we have a compiler config, include it now:
#ifdef BOOST_COMPILER_CONFIG #ifdef BOOST_COMPILER_CONFIG
@ -41,7 +41,7 @@
// if we don't have a std library config set, try and find one: // if we don't have a std library config set, try and find one:
#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) && defined(__cplusplus) #if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) && defined(__cplusplus)
# include <boost/config/select_stdlib_config.hpp> # include <boost/config/detail/select_stdlib_config.hpp>
#endif #endif
// if we have a std library config, include it now: // if we have a std library config, include it now:
#ifdef BOOST_STDLIB_CONFIG #ifdef BOOST_STDLIB_CONFIG
@ -50,7 +50,7 @@
// if we don't have a platform config set, try and find one: // if we don't have a platform config set, try and find one:
#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG) #if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG)
# include <boost/config/select_platform_config.hpp> # include <boost/config/detail/select_platform_config.hpp>
#endif #endif
// if we have a platform config, include it now: // if we have a platform config, include it now:
#ifdef BOOST_PLATFORM_CONFIG #ifdef BOOST_PLATFORM_CONFIG
@ -58,7 +58,7 @@
#endif #endif
// get config suffix code: // get config suffix code:
#include <boost/config/suffix.hpp> #include <boost/config/detail/suffix.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE #ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once #pragma once

View file

@ -45,6 +45,7 @@ BOOST_LIB_PREFIX
+ BOOST_LIB_TOOLSET + BOOST_LIB_TOOLSET
+ BOOST_LIB_THREAD_OPT + BOOST_LIB_THREAD_OPT
+ BOOST_LIB_RT_OPT + BOOST_LIB_RT_OPT
+ BOOST_LIB_ARCH_AND_MODEL_OPT
"-" "-"
+ BOOST_LIB_VERSION + BOOST_LIB_VERSION
@ -69,6 +70,9 @@ BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used,
p STLport build. p STLport build.
n STLport build without its IOStreams. n STLport build without its IOStreams.
BOOST_LIB_ARCH_AND_MODEL_OPT: The architecture and address model
(-x32 or -x64 for x86/32 and x86/64 respectively)
BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
@ -361,6 +365,20 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
#endif #endif
//
// BOOST_LIB_ARCH_AND_MODEL_OPT
//
#if defined( _M_IX86 )
# define BOOST_LIB_ARCH_AND_MODEL_OPT "-x32"
#elif defined( _M_X64 )
# define BOOST_LIB_ARCH_AND_MODEL_OPT "-x64"
#elif defined( _M_ARM )
# define BOOST_LIB_ARCH_AND_MODEL_OPT "-a32"
#elif defined( _M_ARM64 )
# define BOOST_LIB_ARCH_AND_MODEL_OPT "-a64"
#endif
// //
// select linkage opt: // select linkage opt:
// //
@ -380,6 +398,7 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
&& defined(BOOST_LIB_TOOLSET) \ && defined(BOOST_LIB_TOOLSET) \
&& defined(BOOST_LIB_THREAD_OPT) \ && defined(BOOST_LIB_THREAD_OPT) \
&& defined(BOOST_LIB_RT_OPT) \ && defined(BOOST_LIB_RT_OPT) \
&& defined(BOOST_LIB_ARCH_AND_MODEL_OPT) \
&& defined(BOOST_LIB_VERSION) && defined(BOOST_LIB_VERSION)
#ifdef BOOST_AUTO_LINK_TAGGED #ifdef BOOST_AUTO_LINK_TAGGED
@ -393,14 +412,14 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
# endif # endif
#elif defined(BOOST_LIB_BUILDID) #elif defined(BOOST_LIB_BUILDID)
# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib")
# ifdef BOOST_LIB_DIAGNOSTIC # ifdef BOOST_LIB_DIAGNOSTIC
# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") # pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib")
# endif # endif
#else #else
# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib")
# ifdef BOOST_LIB_DIAGNOSTIC # ifdef BOOST_LIB_DIAGNOSTIC
# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") # pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib")
# endif # endif
#endif #endif
@ -431,6 +450,9 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
#if defined(BOOST_LIB_RT_OPT) #if defined(BOOST_LIB_RT_OPT)
# undef BOOST_LIB_RT_OPT # undef BOOST_LIB_RT_OPT
#endif #endif
#if defined(BOOST_LIB_ARCH_AND_MODEL_OPT)
# undef BOOST_LIB_ARCH_AND_MODEL_OPT
#endif
#if defined(BOOST_LIB_LINK_OPT) #if defined(BOOST_LIB_LINK_OPT)
# undef BOOST_LIB_LINK_OPT # undef BOOST_LIB_LINK_OPT
#endif #endif

View file

@ -228,6 +228,17 @@
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif #endif
// C++17
#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
# define BOOST_NO_CXX17_INLINE_VARIABLES
#endif
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if __BORLANDC__ >= 0x590 #if __BORLANDC__ >= 0x590
# define BOOST_HAS_TR1_HASH # define BOOST_HAS_TR1_HASH

View file

@ -27,6 +27,10 @@
#define __has_attribute(x) 0 #define __has_attribute(x) 0
#endif #endif
#ifndef __has_cpp_attribute
#define __has_cpp_attribute(x) 0
#endif
#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS # define BOOST_NO_EXCEPTIONS
#endif #endif
@ -282,6 +286,16 @@
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif #endif
#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
// Clang 3.9+ in c++1z
#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
# define BOOST_NO_CXX17_INLINE_VARIABLES
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if __cplusplus < 201103L #if __cplusplus < 201103L
#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_SFINAE_EXPR
#endif #endif
@ -296,9 +310,19 @@
#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); #define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable();
#endif #endif
#if (__clang_major__ == 3) && (__clang_minor__ == 0)
// Apparently a clang bug:
# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
#endif
// Clang has supported the 'unused' attribute since the first release. // Clang has supported the 'unused' attribute since the first release.
#define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) #define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__))
// Type aliasing hint.
#if __has_attribute(__may_alias__)
# define BOOST_MAY_ALIAS __attribute__((__may_alias__))
#endif
#ifndef BOOST_COMPILER #ifndef BOOST_COMPILER
# define BOOST_COMPILER "Clang version " __clang_version__ # define BOOST_COMPILER "Clang version " __clang_version__
#endif #endif

View file

@ -154,6 +154,19 @@
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif #endif
// C++17
#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
# define BOOST_NO_CXX17_INLINE_VARIABLES
#endif
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
// //
// TR1 macros: // TR1 macros:
// //

View file

@ -138,6 +138,17 @@
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif #endif
// C++17
#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
# define BOOST_NO_CXX17_INLINE_VARIABLES
#endif
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#ifdef c_plusplus #ifdef c_plusplus
// EDG has "long long" in non-strict mode // EDG has "long long" in non-strict mode
// However, some libraries have insufficient "long long" support // However, some libraries have insufficient "long long" support

View file

@ -10,7 +10,7 @@
#define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE) #define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE)
#if _RELEASE < 8 #if _RELEASE_MAJOR < 8
# error "Boost is not configured for Cray compilers prior to version 8, please try the configure script." # error "Boost is not configured for Cray compilers prior to version 8, please try the configure script."
#endif #endif
@ -21,9 +21,9 @@
# error "Unsupported Cray compiler, please try running the configure script." # error "Unsupported Cray compiler, please try running the configure script."
#endif #endif
#if _RELEASE_MINOR < 5 || __cplusplus < 201100
#include <boost/config/compiler/common_edg.hpp> #include <boost/config/compiler/common_edg.hpp>
// //
// //
#define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_STATIC_ASSERT
@ -90,5 +90,35 @@
#define __ATOMIC_SEQ_CST 5 #define __ATOMIC_SEQ_CST 5
#endif #endif
#else /* _RELEASE_MINOR */
#define BOOST_HAS_VARIADIC_TMPL
#define BOOST_HAS_UNISTD_H
#define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
#define BOOST_HAS_TR1_COMPLEX_OVERLOADS
#define BOOST_HAS_STDINT_H
#define BOOST_HAS_STATIC_ASSERT
#define BOOST_HAS_SIGACTION
#define BOOST_HAS_SCHED_YIELD
#define BOOST_HAS_RVALUE_REFS
#define BOOST_HAS_PTHREADS
#define BOOST_HAS_PTHREAD_YIELD
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
#define BOOST_HAS_PARTIAL_STD_ALLOCATOR
#define BOOST_HAS_NRVO
#define BOOST_HAS_NL_TYPES_H
#define BOOST_HAS_NANOSLEEP
#define BOOST_NO_CXX11_SMART_PTR
#define BOOST_NO_CXX11_HDR_FUNCTIONAL
#define BOOST_NO_CXX14_CONSTEXPR
#define BOOST_HAS_LONG_LONG
#define BOOST_HAS_FLOAT128
#if __cplusplus < 201400
#define BOOST_NO_CXX11_DECLTYPE_N3276
#endif /* __cpluspus */
#endif /* _RELEASE_MINOR */

View file

@ -0,0 +1,19 @@
// (C) Copyright Brian Kuhl 2016.
// Use, modification and distribution are subject to 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)
// Check this is a recent EDG based compiler, otherwise we don't support it here:
#ifndef __EDG_VERSION__
# error "Unknown Diab compiler version - please run the configure tests and report the results"
#endif
#include "boost/config/compiler/common_edg.hpp"
#define BOOST_HAS_LONG_LONG
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
#define BOOST_NO_CXX11_HDR_CODECVT
#define BOOST_COMPILER "Wind River Diab " BOOST_STRINGIZE(__VERSION_NUMBER__)

View file

@ -114,6 +114,17 @@
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif #endif
// C++17
#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
# define BOOST_NO_CXX17_INLINE_VARIABLES
#endif
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if (__DMC__ <= 0x840) #if (__DMC__ <= 0x840)
#error "Compiler not supported or configured - please reconfigure" #error "Compiler not supported or configured - please reconfigure"
#endif #endif

View file

@ -288,11 +288,37 @@
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif #endif
// C++17
#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
# define BOOST_NO_CXX17_INLINE_VARIABLES
#endif
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if __GNUC__ >= 7
# define BOOST_FALLTHROUGH __attribute__((fallthrough))
#endif
#ifdef __MINGW32__
// Currently (June 2017) thread_local is broken on mingw for all current compiler releases, see
// https://sourceforge.net/p/mingw-w64/bugs/527/
// Not setting this causes program termination on thread exit.
#define BOOST_NO_CXX11_THREAD_LOCAL
#endif
// //
// Unused attribute: // Unused attribute:
#if __GNUC__ >= 4 #if __GNUC__ >= 4
# define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) # define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__))
#endif #endif
// Type aliasing hint. Supported since gcc 3.3.
#define BOOST_MAY_ALIAS __attribute__((__may_alias__))
// //
// __builtin_unreachable: // __builtin_unreachable:
#if BOOST_GCC_VERSION >= 40800 #if BOOST_GCC_VERSION >= 40800
@ -316,10 +342,10 @@
# error "Compiler not configured - please reconfigure" # error "Compiler not configured - please reconfigure"
#endif #endif
// //
// last known and checked version is 4.9: // last known and checked version is 7.1:
#if (BOOST_GCC_VERSION > 40900) #if (BOOST_GCC_VERSION > 70100)
# if defined(BOOST_ASSERT_CONFIG) # if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results" # error "Boost.Config is older than your compiler - please check for an updated Boost release."
# else # else
// we don't emit warnings here anymore since there are no defect macros defined for // we don't emit warnings here anymore since there are no defect macros defined for
// gcc post 3.4, so any failures are gcc regressions... // gcc post 3.4, so any failures are gcc regressions...

View file

@ -92,6 +92,17 @@
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif #endif
// C++17
#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
# define BOOST_NO_CXX17_INLINE_VARIABLES
#endif
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__ #define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__

View file

@ -311,6 +311,12 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
# define BOOST_SYMBOL_IMPORT # define BOOST_SYMBOL_IMPORT
# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) # define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))
#endif #endif
// Type aliasing hint
#if defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1300)
# define BOOST_MAY_ALIAS __attribute__((__may_alias__))
#endif
// //
// C++0x features // C++0x features
// For each feature we need to check both the Intel compiler version, // For each feature we need to check both the Intel compiler version,
@ -545,7 +551,7 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
// last known and checked version: // last known and checked version:
#if (BOOST_INTEL_CXX_VERSION > 1700) #if (BOOST_INTEL_CXX_VERSION > 1700)
# if defined(BOOST_ASSERT_CONFIG) # if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results" # error "Boost.Config is older than your compiler - please check for an updated Boost release."
# elif defined(_MSC_VER) # elif defined(_MSC_VER)
// //
// We don't emit this warning any more, since we have so few // We don't emit this warning any more, since we have so few

View file

@ -157,6 +157,17 @@
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif #endif
// C++17
#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
# define BOOST_NO_CXX17_INLINE_VARIABLES
#endif
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) #define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
// //

View file

@ -106,6 +106,17 @@
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif #endif
// C++17
#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
# define BOOST_NO_CXX17_INLINE_VARIABLES
#endif
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
// //
// versions check: // versions check:
// we don't support MPW prior to version 8.9: // we don't support MPW prior to version 8.9:

View file

@ -11,6 +11,13 @@
# define BOOST_COMPILER "NVIDIA CUDA C++ Compiler" # define BOOST_COMPILER "NVIDIA CUDA C++ Compiler"
#endif #endif
#if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__)
# define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__
#else
// We don't really know what the CUDA version is, but it's definitely before 7.5:
# define BOOST_CUDA_VERSION 7000000
#endif
// NVIDIA Specific support // NVIDIA Specific support
// BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device // BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device
#define BOOST_GPU_ENABLED __host__ __device__ #define BOOST_GPU_ENABLED __host__ __device__
@ -19,14 +26,33 @@
// https://svn.boost.org/trac/boost/ticket/11897 // https://svn.boost.org/trac/boost/ticket/11897
// This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance // This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance
// check is enough to detect versions < 7.5 // check is enough to detect versions < 7.5
#if !defined(__CUDACC_VER__) || (__CUDACC_VER__ < 70500) #if BOOST_CUDA_VERSION < 7050000
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES # define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#endif #endif
// The same bug is back again in 8.0: // The same bug is back again in 8.0:
#if (__CUDACC_VER__ > 80000) && (__CUDACC_VER__ < 80100) #if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000)
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES # define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#endif #endif
// Most recent CUDA (8.0) has no constexpr support in msvc mode: // Most recent CUDA (8.0) has no constexpr support in msvc mode:
#if defined(_MSC_VER) #if defined(_MSC_VER)
# define BOOST_NO_CXX11_CONSTEXPR # define BOOST_NO_CXX11_CONSTEXPR
#endif #endif
#ifdef __CUDACC__
//
// When compiing .cu files, there's a bunch of stuff that doesn't work with msvc:
//
#if defined(_MSC_VER)
# define BOOST_NO_CXX14_DIGIT_SEPARATORS
# define BOOST_NO_CXX11_UNICODE_LITERALS
#endif
//
// And this one effects the NVCC front end,
// See https://svn.boost.org/trac/boost/ticket/13049
//
#if (BOOST_CUDA_VERSION >= 8000000) && (BOOST_CUDA_VERSION < 8010000)
# define BOOST_NO_CXX11_NOEXCEPT
#endif
#endif

View file

@ -12,7 +12,12 @@
# define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__ # define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__
#endif #endif
#if __PATHCC__ >= 4 #if __PATHCC__ >= 6
// PathCC is based on clang, and supports the __has_*() builtins used
// to detect features in clang.hpp. Since the clang toolset is much
// better maintained, it is more convenient to reuse its definitions.
# include "boost/config/compiler/clang.hpp"
#elif __PATHCC__ >= 4
# define BOOST_MSVC6_MEMBER_TEMPLATES # define BOOST_MSVC6_MEMBER_TEMPLATES
# define BOOST_HAS_UNISTD_H # define BOOST_HAS_UNISTD_H
# define BOOST_HAS_STDINT_H # define BOOST_HAS_STDINT_H
@ -113,4 +118,15 @@
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif #endif
// C++17
#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
# define BOOST_NO_CXX17_INLINE_VARIABLES
#endif
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#endif #endif

View file

@ -1,4 +1,5 @@
// (C) Copyright Noel Belcourt 2007. // (C) Copyright Noel Belcourt 2007.
// Copyright 2017, NVIDIA CORPORATION.
// Use, modification and distribution are subject to the // Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file // Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -10,148 +11,13 @@
#define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__ #define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__
#define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) #define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
// // PGI is mostly GNU compatible. So start with that.
// Threading support: #include <boost/config/compiler/gcc.hpp>
// Turn this on unconditionally here, it will get turned off again later
// if no threading API is detected.
//
#if __PGIC__ >= 11 // Now adjust for things that are different.
// options requested by configure --enable-test // __float128 is a typedef, not a distinct type.
#define BOOST_HAS_PTHREADS #undef BOOST_HAS_FLOAT128
#define BOOST_HAS_THREADS
#define BOOST_HAS_PTHREAD_YIELD
#define BOOST_HAS_NRVO
#define BOOST_HAS_LONG_LONG
// options --enable-test wants undefined
#undef BOOST_NO_STDC_NAMESPACE
#undef BOOST_NO_EXCEPTION_STD_NAMESPACE
#undef BOOST_DEDUCED_TYPENAME
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
#elif __PGIC__ >= 10
// options requested by configure --enable-test
#define BOOST_HAS_THREADS
#define BOOST_HAS_NRVO
#define BOOST_HAS_LONG_LONG
#if defined(linux) || defined(__linux) || defined(__linux__)
# define BOOST_HAS_STDINT_H
#endif
// options --enable-test wants undefined
#undef BOOST_NO_STDC_NAMESPACE
#undef BOOST_NO_EXCEPTION_STD_NAMESPACE
#undef BOOST_DEDUCED_TYPENAME
#elif __PGIC__ >= 7
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#define BOOST_NO_SWPRINTF
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
#else
# error "Pgi compiler not configured - please reconfigure"
#endif
//
// C++0x features
//
// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
//
#define BOOST_NO_CXX11_CHAR16_T
#define BOOST_NO_CXX11_CHAR32_T
#define BOOST_NO_CXX11_CONSTEXPR
#define BOOST_NO_CXX11_DECLTYPE
#define BOOST_NO_CXX11_DECLTYPE_N3276
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
#define BOOST_NO_CXX11_EXTERN_TEMPLATE
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
#define BOOST_NO_CXX11_LAMBDAS
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
#define BOOST_NO_CXX11_NOEXCEPT
#define BOOST_NO_CXX11_NULLPTR
#define BOOST_NO_CXX11_NUMERIC_LIMITS
#define BOOST_NO_CXX11_RANGE_BASED_FOR
#define BOOST_NO_CXX11_RAW_LITERALS
#define BOOST_NO_CXX11_RVALUE_REFERENCES
#define BOOST_NO_CXX11_SCOPED_ENUMS
#define BOOST_NO_SFINAE_EXPR
#define BOOST_NO_CXX11_SFINAE_EXPR
#define BOOST_NO_CXX11_STATIC_ASSERT
#define BOOST_NO_SWPRINTF
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
#define BOOST_NO_CXX11_UNICODE_LITERALS
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_VARIADIC_MACROS
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#define BOOST_NO_CXX11_HDR_UNORDERED_SET
#define BOOST_NO_CXX11_HDR_UNORDERED_MAP
#define BOOST_NO_CXX11_HDR_TYPEINDEX
#define BOOST_NO_CXX11_HDR_TYPE_TRAITS
#define BOOST_NO_CXX11_HDR_TUPLE
#define BOOST_NO_CXX11_HDR_THREAD
#define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
#define BOOST_NO_CXX11_HDR_REGEX
#define BOOST_NO_CXX11_HDR_RATIO
#define BOOST_NO_CXX11_HDR_RANDOM
#define BOOST_NO_CXX11_HDR_MUTEX
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
#define BOOST_NO_CXX11_HDR_FUTURE
#define BOOST_NO_CXX11_HDR_FORWARD_LIST
#define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
#define BOOST_NO_CXX11_HDR_CODECVT
#define BOOST_NO_CXX11_HDR_CHRONO
#define BOOST_NO_CXX11_HDR_ARRAY
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#define BOOST_NO_CXX11_ALIGNAS
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
#define BOOST_NO_CXX11_THREAD_LOCAL
// C++ 14:
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
# define BOOST_NO_CXX14_AGGREGATE_NSDMI
#endif
#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
# define BOOST_NO_CXX14_BINARY_LITERALS
#endif
#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
# define BOOST_NO_CXX14_CONSTEXPR
#endif
#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
# define BOOST_NO_CXX14_DECLTYPE_AUTO
#endif
#if (__cplusplus < 201304) // There's no SD6 check for this....
# define BOOST_NO_CXX14_DIGIT_SEPARATORS
#endif
#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
# define BOOST_NO_CXX14_GENERIC_LAMBDAS
#endif
#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
#endif
#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
#endif
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
//
// version check:
// probably nothing to do here?
// __int128 is not supported.
#undef BOOST_HAS_INT128

View file

@ -172,6 +172,17 @@
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif #endif
// C++17
#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
# define BOOST_NO_CXX17_INLINE_VARIABLES
#endif
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
// Turn on threading support for Solaris 12. // Turn on threading support for Solaris 12.
// Ticket #11972 // Ticket #11972
#if (__SUNPRO_CC >= 0x5140) && defined(__SunOS_5_12) && !defined(BOOST_HAS_THREADS) #if (__SUNPRO_CC >= 0x5140) && defined(__SunOS_5_12) && !defined(BOOST_HAS_THREADS)
@ -191,9 +202,9 @@
#error "Compiler not supported or configured - please reconfigure" #error "Compiler not supported or configured - please reconfigure"
#endif #endif
// //
// last known and checked version is 0x590: // last known and checked version:
#if (__SUNPRO_CC > 0x590) #if (__SUNPRO_CC > 0x5150)
# if defined(BOOST_ASSERT_CONFIG) # if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results" # error "Boost.Config is older than your compiler - please check for an updated Boost release."
# endif # endif
#endif #endif

View file

@ -65,6 +65,11 @@
#define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS #define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
#endif #endif
// Type aliasing hint. Supported since XL C++ 13.1
#if (__IBMCPP__ >= 1310)
# define BOOST_MAY_ALIAS __attribute__((__may_alias__))
#endif
// //
// C++0x features // C++0x features
// //
@ -162,3 +167,14 @@
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif #endif
// C++17
#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
# define BOOST_NO_CXX17_INLINE_VARIABLES
#endif
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif

View file

@ -107,7 +107,7 @@
// //
// TR1 features: // TR1 features:
// //
#if _MSC_VER >= 1700 #if (_MSC_VER >= 1700) && defined(_HAS_CXX17) && (_HAS_CXX17 > 0)
// # define BOOST_HAS_TR1_HASH // don't know if this is true yet. // # define BOOST_HAS_TR1_HASH // don't know if this is true yet.
// # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet. // # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet.
# define BOOST_HAS_TR1_UNORDERED_MAP # define BOOST_HAS_TR1_UNORDERED_MAP
@ -194,7 +194,12 @@
// //
#if (_MSC_VER < 1910) #if (_MSC_VER < 1910)
# define BOOST_NO_CXX14_AGGREGATE_NSDMI # define BOOST_NO_CXX14_AGGREGATE_NSDMI
# define BOOST_NO_CXX14_CONSTEXPR #endif
// C++17 features supported by VC++ 14.1 (Visual Studio 2017) Update 3
//
#if (_MSC_VER < 1911) || (_MSVC_LANG < 201703)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif #endif
// MSVC including version 14 has not yet completely // MSVC including version 14 has not yet completely
@ -218,6 +223,11 @@
// //
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP #define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_SFINAE_EXPR
// C++ 14:
# define BOOST_NO_CXX14_CONSTEXPR
// C++ 17:
#define BOOST_NO_CXX17_INLINE_VARIABLES
#define BOOST_NO_CXX17_FOLD_EXPRESSIONS
// //
// Things that don't work in clr mode: // Things that don't work in clr mode:
@ -284,7 +294,7 @@
# endif # endif
# endif # endif
# else # else
# if _MSC_VER < 1310 # if _MSC_VER < 1200
// Note: Versions up to 7.0 aren't supported. // Note: Versions up to 7.0 aren't supported.
# define BOOST_COMPILER_VERSION 5.0 # define BOOST_COMPILER_VERSION 5.0
# elif _MSC_VER < 1300 # elif _MSC_VER < 1300
@ -316,11 +326,11 @@
#endif #endif
// //
// last known and checked version is 19.10.25017 (VC++ 2017): // last known and checked version is 19.11.25547 (VC++ 2017.4):
#if (_MSC_VER > 1910) #if (_MSC_VER > 1911)
# if defined(BOOST_ASSERT_CONFIG) # if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results" # error "Boost.Config is older than your current compiler version."
# else # elif !defined(BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE)
# pragma message("Unknown compiler version - please run the configure tests and report the results") # pragma message("Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.")
# endif # endif
#endif #endif

View file

@ -23,6 +23,10 @@
#define __has_extension __has_feature #define __has_extension __has_feature
#endif #endif
#ifndef __has_cpp_attribute
#define __has_cpp_attribute(x) 0
#endif
#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS # define BOOST_NO_EXCEPTIONS
#endif #endif
@ -238,6 +242,16 @@
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES # define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif #endif
#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
// Clang 3.9+ in c++1z
#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
# define BOOST_NO_CXX17_INLINE_VARIABLES
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if !__has_feature(cxx_thread_local) #if !__has_feature(cxx_thread_local)
# define BOOST_NO_CXX11_THREAD_LOCAL # define BOOST_NO_CXX11_THREAD_LOCAL
#endif #endif
@ -253,6 +267,11 @@
# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) # define BOOST_ATTRIBUTE_UNUSED __attribute__((unused))
#endif #endif
// Type aliasing hint.
#if __has_attribute(__may_alias__)
# define BOOST_MAY_ALIAS __attribute__((__may_alias__))
#endif
#ifndef BOOST_COMPILER #ifndef BOOST_COMPILER
# define BOOST_COMPILER "Clang version " __clang_version__ # define BOOST_COMPILER "Clang version " __clang_version__
#endif #endif

View file

@ -0,0 +1,169 @@
// Copyright (c) 2017 Dynatrace
//
// 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 for most recent version.
// Compiler setup for IBM z/OS XL C/C++ compiler.
// Oldest compiler version currently supported is 2.1 (V2R1)
#if !defined(__IBMCPP__) || !defined(__COMPILER_VER__) || __COMPILER_VER__ < 0x42010000
# error "Compiler not supported or configured - please reconfigure"
#endif
#if __COMPILER_VER__ > 0x42010000
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results"
# endif
#endif
#define BOOST_COMPILER "IBM z/OS XL C/C++ version " BOOST_STRINGIZE(__COMPILER_VER__)
#define BOOST_XLCPP_ZOS __COMPILER_VER__
// -------------------------------------
#include <features.h> // For __UU, __C99, __TR1, ...
#if !defined(__IBMCPP_DEFAULTED_AND_DELETED_FUNCTIONS)
# define BOOST_NO_CXX11_DELETED_FUNCTIONS
# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
#endif
// -------------------------------------
#if defined(__UU) || defined(__C99) || defined(__TR1)
# define BOOST_HAS_LOG1P
# define BOOST_HAS_EXPM1
#endif
#if defined(__C99) || defined(__TR1)
# define BOOST_HAS_STDINT_H
#else
# define BOOST_NO_FENV_H
#endif
// -------------------------------------
#define BOOST_HAS_NRVO
#if !defined(__RTTI_ALL__)
# define BOOST_NO_RTTI
#endif
#if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
#endif
#if defined(_LONG_LONG) || defined(__IBMCPP_C99_LONG_LONG) || defined(__LL)
# define BOOST_HAS_LONG_LONG
#else
# define BOOST_NO_LONG_LONG
#endif
#if defined(_LONG_LONG) || defined(__IBMCPP_C99_LONG_LONG) || defined(__LL) || defined(_LP64)
# define BOOST_HAS_MS_INT64
#endif
#define BOOST_NO_SFINAE_EXPR
#define BOOST_NO_CXX11_SFINAE_EXPR
#if defined(__IBMCPP_VARIADIC_TEMPLATES)
# define BOOST_HAS_VARIADIC_TMPL
#else
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
#endif
#if defined(__IBMCPP_STATIC_ASSERT)
# define BOOST_HAS_STATIC_ASSERT
#else
# define BOOST_NO_CXX11_STATIC_ASSERT
#endif
#if defined(__IBMCPP_RVALUE_REFERENCES)
# define BOOST_HAS_RVALUE_REFS
#else
# define BOOST_NO_CXX11_RVALUE_REFERENCES
#endif
#if !defined(__IBMCPP_SCOPED_ENUM)
# define BOOST_NO_CXX11_SCOPED_ENUMS
#endif
#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
#if !defined(__IBMCPP_EXPLICIT_CONVERSION_OPERATORS)
# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
#endif
#if !defined(__IBMCPP_DECLTYPE)
# define BOOST_NO_CXX11_DECLTYPE
#else
# define BOOST_HAS_DECLTYPE
#endif
#define BOOST_NO_CXX11_DECLTYPE_N3276
#if !defined(__IBMCPP_INLINE_NAMESPACE)
# define BOOST_NO_CXX11_INLINE_NAMESPACES
#endif
#if !defined(__IBMCPP_AUTO_TYPEDEDUCTION)
# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
# define BOOST_NO_CXX11_AUTO_DECLARATIONS
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
#endif
#if !defined(__IBM_CHAR32_T__)
# define BOOST_NO_CXX11_CHAR32_T
#endif
#if !defined(__IBM_CHAR16_T__)
# define BOOST_NO_CXX11_CHAR16_T
#endif
#if !defined(__IBMCPP_CONSTEXPR)
# define BOOST_NO_CXX11_CONSTEXPR
#endif
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#define BOOST_NO_CXX11_UNICODE_LITERALS
#define BOOST_NO_CXX11_RAW_LITERALS
#define BOOST_NO_CXX11_RANGE_BASED_FOR
#define BOOST_NO_CXX11_NULLPTR
#define BOOST_NO_CXX11_NOEXCEPT
#define BOOST_NO_CXX11_LAMBDAS
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#define BOOST_NO_CXX11_THREAD_LOCAL
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
#define BOOST_NO_CXX11_ALIGNAS
#define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
#define BOOST_NO_CXX14_AGGREGATE_NSDMI
#define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
#define BOOST_NO_CXX14_GENERIC_LAMBDAS
#define BOOST_NO_CXX14_DIGIT_SEPARATORS
#define BOOST_NO_CXX14_DECLTYPE_AUTO
#define BOOST_NO_CXX14_CONSTEXPR
#define BOOST_NO_CXX14_BINARY_LITERALS
#define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#define BOOST_NO_CXX17_INLINE_VARIABLES
#define BOOST_NO_CXX17_FOLD_EXPRESSIONS
// -------------------------------------
#if defined(__IBM_ATTRIBUTES)
# define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__))
# define BOOST_NOINLINE __attribute__ ((__noinline__))
# define BOOST_MAY_ALIAS __attribute__((__may_alias__))
// No BOOST_ALIGNMENT - explicit alignment support is broken (V2R1).
#endif
extern "builtin" long __builtin_expect(long, long);
#define BOOST_LIKELY(x) __builtin_expect((x) && true, 1)
#define BOOST_UNLIKELY(x) __builtin_expect((x) && true, 0)

View file

@ -0,0 +1,95 @@
// (C) Copyright John Maddock 2001 - 2003.
// Use, modification and distribution are subject to 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 for most recent version.
// All POSIX feature tests go in this file,
// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well
// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's
// may be present but none-functional unless _POSIX_C_SOURCE and
// _XOPEN_SOURCE have been defined to the right value (it's up
// to the user to do this *before* including any header, although
// in most cases the compiler will do this for you).
# if defined(BOOST_HAS_UNISTD_H)
# include <unistd.h>
// XOpen has <nl_types.h>, but is this the correct version check?
# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3)
# define BOOST_HAS_NL_TYPES_H
# endif
// POSIX version 6 requires <stdint.h>
# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100)
# define BOOST_HAS_STDINT_H
# endif
// POSIX version 2 requires <dirent.h>
# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L)
# define BOOST_HAS_DIRENT_H
# endif
// POSIX version 3 requires <signal.h> to have sigaction:
# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L)
# define BOOST_HAS_SIGACTION
# endif
// POSIX defines _POSIX_THREADS > 0 for pthread support,
// however some platforms define _POSIX_THREADS without
// a value, hence the (_POSIX_THREADS+0 >= 0) check.
// Strictly speaking this may catch platforms with a
// non-functioning stub <pthreads.h>, but such occurrences should
// occur very rarely if at all.
# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS)
# define BOOST_HAS_PTHREADS
# endif
// BOOST_HAS_NANOSLEEP:
// This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME:
# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \
|| (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
# define BOOST_HAS_NANOSLEEP
# endif
// BOOST_HAS_CLOCK_GETTIME:
// This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME
// but at least one platform - linux - defines that flag without
// defining clock_gettime):
# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0))
# define BOOST_HAS_CLOCK_GETTIME
# endif
// BOOST_HAS_SCHED_YIELD:
// This is predicated on _POSIX_PRIORITY_SCHEDULING or
// on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME.
# if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\
|| (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\
|| (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
# define BOOST_HAS_SCHED_YIELD
# endif
// BOOST_HAS_GETTIMEOFDAY:
// BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE:
// These are predicated on _XOPEN_VERSION, and appears to be first released
// in issue 4, version 2 (_XOPEN_VERSION > 500).
// Likewise for the functions log1p and expm1.
# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500)
# define BOOST_HAS_GETTIMEOFDAY
# if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500)
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
# endif
# ifndef BOOST_HAS_LOG1P
# define BOOST_HAS_LOG1P
# endif
# ifndef BOOST_HAS_EXPM1
# define BOOST_HAS_EXPM1
# endif
# endif
# endif

View file

@ -0,0 +1,158 @@
// Boost compiler configuration selection header file
// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Martin Wille 2003.
// (C) Copyright Guillaume Melquiond 2003.
//
// 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/ for most recent version.
// locate which compiler we are using and define
// BOOST_COMPILER_CONFIG as needed:
#if defined __CUDACC__
// NVIDIA CUDA C++ compiler for GPU
# include "boost/config/compiler/nvcc.hpp"
#endif
#if defined(__GCCXML__)
// GCC-XML emulates other compilers, it has to appear first here!
# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
#elif defined(_CRAYC)
// EDG based Cray compiler:
# define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp"
#elif defined __COMO__
// Comeau C++
# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4)
// PathScale EKOPath compiler (has to come before clang and gcc)
# define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp"
#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
// Intel
# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp"
#elif defined __clang__ && !defined(__CUDACC__) && !defined(__ibmxl__)
// when using clang and cuda at same time, you want to appear as gcc
// Clang C++ emulates GCC, so it has to appear early.
# define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp"
#elif defined __DMC__
// Digital Mars C++
# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp"
#elif defined __DCC__
// Wind River Diab C++
# define BOOST_COMPILER_CONFIG "boost/config/compiler/diab.hpp"
#elif defined(__PGI)
// Portland Group Inc.
# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp"
# elif defined(__GNUC__) && !defined(__ibmxl__)
// GNU C++:
# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp"
#elif defined __KCC
// Kai C++
# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp"
#elif defined __sgi
// SGI MIPSpro C++
# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp"
#elif defined __DECCXX
// Compaq Tru64 Unix cxx
# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp"
#elif defined __ghs
// Greenhills C++
# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp"
#elif defined __CODEGEARC__
// CodeGear - must be checked for before Borland
# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp"
#elif defined __BORLANDC__
// Borland
# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp"
#elif defined __MWERKS__
// Metrowerks CodeWarrior
# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp"
#elif defined __SUNPRO_CC
// Sun Workshop Compiler C++
# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp"
#elif defined __HP_aCC
// HP aCC
# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp"
#elif defined(__MRC__) || defined(__SC__)
// MPW MrCpp or SCpp
# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp"
#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__)
// IBM z/OS XL C/C++
# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp_zos.hpp"
#elif defined(__ibmxl__)
// IBM XL C/C++ for Linux (Little Endian)
# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp.hpp"
#elif defined(__IBMCPP__)
// IBM Visual Age or IBM XL C/C++ for Linux (Big Endian)
# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp"
#elif defined _MSC_VER
// Microsoft Visual C++
//
// Must remain the last #elif since some other vendors (Metrowerks, for
// example) also #define _MSC_VER
# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp"
#elif defined (BOOST_ASSERT_CONFIG)
// this must come last - generate an error if we don't
// recognise the compiler:
# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)"
#endif
#if 0
//
// This section allows dependency scanners to find all the headers we *might* include:
//
#include <boost/config/compiler/gcc_xml.hpp>
#include <boost/config/compiler/cray.hpp>
#include <boost/config/compiler/comeau.hpp>
#include <boost/config/compiler/pathscale.hpp>
#include <boost/config/compiler/intel.hpp>
#include <boost/config/compiler/clang.hpp>
#include <boost/config/compiler/digitalmars.hpp>
#include <boost/config/compiler/gcc.hpp>
#include <boost/config/compiler/kai.hpp>
#include <boost/config/compiler/sgi_mipspro.hpp>
#include <boost/config/compiler/compaq_cxx.hpp>
#include <boost/config/compiler/greenhills.hpp>
#include <boost/config/compiler/codegear.hpp>
#include <boost/config/compiler/borland.hpp>
#include <boost/config/compiler/metrowerks.hpp>
#include <boost/config/compiler/sunpro_cc.hpp>
#include <boost/config/compiler/hp_acc.hpp>
#include <boost/config/compiler/mpw.hpp>
#include <boost/config/compiler/xlcpp_zos.hpp>
#include <boost/config/compiler/xlcpp.hpp>
#include <boost/config/compiler/vacpp.hpp>
#include <boost/config/compiler/pgi.hpp>
#include <boost/config/compiler/visualc.hpp>
#endif

View file

@ -0,0 +1,142 @@
// Boost compiler configuration selection header file
// (C) Copyright John Maddock 2001 - 2002.
// (C) Copyright Jens Maurer 2001.
// Use, modification and distribution are subject to 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 for most recent version.
// locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed.
// Note that we define the headers to include using "header_name" not
// <header_name> in order to prevent macro expansion within the header
// name (for example "linux" is a macro on linux systems).
#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC)
// linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though?
# define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp"
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
// BSD:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp"
#elif defined(sun) || defined(__sun)
// solaris:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp"
#elif defined(__sgi)
// SGI Irix:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp"
#elif defined(__hpux)
// hp unix:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp"
#elif defined(__CYGWIN__)
// cygwin is not win32:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp"
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
// win32:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp"
#elif defined(__HAIKU__)
// Haiku
# define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp"
#elif defined(__BEOS__)
// BeOS
# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
// MacOS
# define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp"
#elif defined(__TOS_MVS__)
// IBM z/OS
# define BOOST_PLATFORM_CONFIG "boost/config/platform/zos.hpp"
#elif defined(__IBMCPP__) || defined(_AIX)
// IBM AIX
# define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp"
#elif defined(__amigaos__)
// AmigaOS
# define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp"
#elif defined(__QNXNTO__)
// QNX:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp"
#elif defined(__VXWORKS__)
// vxWorks:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp"
#elif defined(__SYMBIAN32__)
// Symbian:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp"
#elif defined(_CRAYC)
// Cray:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp"
#elif defined(__VMS)
// VMS:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp"
#elif defined(__CloudABI__)
// Nuxi CloudABI:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/cloudabi.hpp"
#else
# if defined(unix) \
|| defined(__unix) \
|| defined(_XOPEN_SOURCE) \
|| defined(_POSIX_SOURCE)
// generic unix platform:
# ifndef BOOST_HAS_UNISTD_H
# define BOOST_HAS_UNISTD_H
# endif
# include <boost/config/detail/posix_features.hpp>
# endif
# if defined (BOOST_ASSERT_CONFIG)
// this must come last - generate an error if we don't
// recognise the platform:
# error "Unknown platform - please configure and report the results to boost.org"
# endif
#endif
#if 0
//
// This section allows dependency scanners to find all the files we *might* include:
//
# include "boost/config/platform/linux.hpp"
# include "boost/config/platform/bsd.hpp"
# include "boost/config/platform/solaris.hpp"
# include "boost/config/platform/irix.hpp"
# include "boost/config/platform/hpux.hpp"
# include "boost/config/platform/cygwin.hpp"
# include "boost/config/platform/win32.hpp"
# include "boost/config/platform/beos.hpp"
# include "boost/config/platform/macos.hpp"
# include "boost/config/platform/zos.hpp"
# include "boost/config/platform/aix.hpp"
# include "boost/config/platform/amigaos.hpp"
# include "boost/config/platform/qnxnto.hpp"
# include "boost/config/platform/vxworks.hpp"
# include "boost/config/platform/symbian.hpp"
# include "boost/config/platform/cray.hpp"
# include "boost/config/platform/vms.hpp"
# include <boost/config/detail/posix_features.hpp>
#endif

View file

@ -0,0 +1,110 @@
// Boost compiler configuration selection header file
// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Jens Maurer 2001 - 2002.
// Use, modification and distribution are subject to 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 for most recent version.
// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed:
// First include <cstddef> to determine if some version of STLport is in use as the std lib
// (do not rely on this header being included since users can short-circuit this header
// if they know whose std lib they are using.)
#ifdef __cplusplus
# include <cstddef>
#else
# include <stddef.h>
#endif
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
// STLPort library; this _must_ come first, otherwise since
// STLport typically sits on top of some other library, we
// can end up detecting that first rather than STLport:
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp"
#else
// If our std lib was not some version of STLport, and has not otherwise
// been detected, then include <utility> as it is about
// the smallest of the std lib headers that includes real C++ stuff.
// Some std libs do not include their C++-related macros in <cstddef>
// so this additional include makes sure we get those definitions.
// Note: do not rely on this header being included since users can short-circuit this
// #include if they know whose std lib they are using.
#if !defined(__LIBCOMO__) && !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)\
&& !defined(_LIBCPP_VERSION) && !defined(__GLIBCPP__) && !defined(__GLIBCXX__)\
&& !defined(__STL_CONFIG_H) && !defined(__MSL_CPP__) && !defined(__IBMCPP__)\
&& !defined(MSIPL_COMPILE_H) && !defined(_YVALS) && !defined(_CPPLIB_VER)
#include <utility>
#endif
#if defined(__LIBCOMO__)
// Comeau STL:
#define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp"
#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
// Rogue Wave library:
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp"
#elif defined(_LIBCPP_VERSION)
// libc++
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp"
#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
// GNU libstdc++ 3
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp"
#elif defined(__STL_CONFIG_H)
// generic SGI STL
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp"
#elif defined(__MSL_CPP__)
// MSL standard lib:
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp"
#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__)
// IBM z/OS XL C/C++
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/xlcpp_zos.hpp"
#elif defined(__IBMCPP__)
// take the default VACPP std lib
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp"
#elif defined(MSIPL_COMPILE_H)
// Modena C++ standard library
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp"
#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
// Dinkumware Library (this has to appear after any possible replacement libraries):
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp"
#elif defined (BOOST_ASSERT_CONFIG)
// this must come last - generate an error if we don't
// recognise the library:
# error "Unknown standard library - please configure and report the results to boost.org"
#endif
#endif
#if 0
//
// This section allows dependency scanners to find all the files we *might* include:
//
# include "boost/config/stdlib/stlport.hpp"
# include "boost/config/stdlib/libcomo.hpp"
# include "boost/config/stdlib/roguewave.hpp"
# include "boost/config/stdlib/libcpp.hpp"
# include "boost/config/stdlib/libstdcpp3.hpp"
# include "boost/config/stdlib/sgi.hpp"
# include "boost/config/stdlib/msl.hpp"
# include "boost/config/stdlib/xlcpp_zos.hpp"
# include "boost/config/stdlib/vacpp.hpp"
# include "boost/config/stdlib/modena.hpp"
# include "boost/config/stdlib/dinkumware.hpp"
#endif

File diff suppressed because it is too large Load diff

View file

@ -26,7 +26,7 @@
//#define BOOST_HAS_PTHREAD_YIELD //#define BOOST_HAS_PTHREAD_YIELD
// boilerplate code: // boilerplate code:
#include <boost/config/posix_features.hpp> #include <boost/config/detail/posix_features.hpp>

View file

@ -20,7 +20,7 @@
#endif #endif
// boilerplate code: // boilerplate code:
#include <boost/config/posix_features.hpp> #include <boost/config/detail/posix_features.hpp>

View file

@ -77,7 +77,7 @@
// boilerplate code: // boilerplate code:
#define BOOST_HAS_UNISTD_H #define BOOST_HAS_UNISTD_H
#include <boost/config/posix_features.hpp> #include <boost/config/detail/posix_features.hpp>

View file

@ -12,7 +12,7 @@
// boilerplate code: // boilerplate code:
#define BOOST_HAS_UNISTD_H #define BOOST_HAS_UNISTD_H
#include <boost/config/posix_features.hpp> #include <boost/config/detail/posix_features.hpp>

View file

@ -43,7 +43,7 @@
#define BOOST_NO_FENV_H #define BOOST_NO_FENV_H
// boilerplate code: // boilerplate code:
#include <boost/config/posix_features.hpp> #include <boost/config/detail/posix_features.hpp>
// //
// Cygwin lies about XSI conformance, there is no nl_types.h: // Cygwin lies about XSI conformance, there is no nl_types.h:

View file

@ -28,4 +28,4 @@
#define BOOST_HAS_GETTIMEOFDAY #define BOOST_HAS_GETTIMEOFDAY
// boilerplate code: // boilerplate code:
#include <boost/config/posix_features.hpp> #include <boost/config/detail/posix_features.hpp>

View file

@ -43,7 +43,7 @@
// boilerplate code: // boilerplate code:
#define BOOST_HAS_UNISTD_H #define BOOST_HAS_UNISTD_H
#include <boost/config/posix_features.hpp> #include <boost/config/detail/posix_features.hpp>
// the following are always available: // the following are always available:
#ifndef BOOST_HAS_GETTIMEOFDAY #ifndef BOOST_HAS_GETTIMEOFDAY

View file

@ -25,7 +25,7 @@
// boilerplate code: // boilerplate code:
#define BOOST_HAS_UNISTD_H #define BOOST_HAS_UNISTD_H
#include <boost/config/posix_features.hpp> #include <boost/config/detail/posix_features.hpp>

View file

@ -24,8 +24,9 @@
#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1))) #if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1)))
// <stdint.h> defines int64_t unconditionally, but <sys/types.h> defines // <stdint.h> defines int64_t unconditionally, but <sys/types.h> defines
// int64_t only if __GNUC__. Thus, assume a fully usable <stdint.h> // int64_t only if __GNUC__. Thus, assume a fully usable <stdint.h>
// only when using GCC. // only when using GCC. Update 2017: this appears not to be the case for
# if defined __GNUC__ // recent glibc releases, see bug report: https://svn.boost.org/trac/boost/ticket/13045
# if defined(__GNUC__) || ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 5)))
# define BOOST_HAS_STDINT_H # define BOOST_HAS_STDINT_H
# endif # endif
#endif #endif
@ -71,7 +72,7 @@
// boilerplate code: // boilerplate code:
#define BOOST_HAS_UNISTD_H #define BOOST_HAS_UNISTD_H
#include <boost/config/posix_features.hpp> #include <boost/config/detail/posix_features.hpp>
#if defined(__USE_GNU) && !defined(__ANDROID__) && !defined(ANDROID) #if defined(__USE_GNU) && !defined(__ANDROID__) && !defined(ANDROID)
#define BOOST_HAS_PTHREAD_YIELD #define BOOST_HAS_PTHREAD_YIELD
#endif #endif

View file

@ -25,7 +25,7 @@
// to replace the platform-native BSD one. G++ users // to replace the platform-native BSD one. G++ users
// should also always be able to do this on MaxOS X. // should also always be able to do this on MaxOS X.
// //
# include <boost/config/posix_features.hpp> # include <boost/config/detail/posix_features.hpp>
# ifndef BOOST_HAS_STDINT_H # ifndef BOOST_HAS_STDINT_H
# define BOOST_HAS_STDINT_H # define BOOST_HAS_STDINT_H
# endif # endif

View file

@ -10,7 +10,7 @@
#define BOOST_PLATFORM "QNX" #define BOOST_PLATFORM "QNX"
#define BOOST_HAS_UNISTD_H #define BOOST_HAS_UNISTD_H
#include <boost/config/posix_features.hpp> #include <boost/config/detail/posix_features.hpp>
// QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h // QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h
// or log1p and expm1: // or log1p and expm1:

View file

@ -14,7 +14,7 @@
// boilerplate code: // boilerplate code:
#define BOOST_HAS_UNISTD_H #define BOOST_HAS_UNISTD_H
#include <boost/config/posix_features.hpp> #include <boost/config/detail/posix_features.hpp>
// //
// pthreads don't actually work with gcc unless _PTHREADS is defined: // pthreads don't actually work with gcc unless _PTHREADS is defined:

View file

@ -24,7 +24,7 @@
#include <stdlib.h> #include <stdlib.h>
#endif// boilerplate code: #endif// boilerplate code:
# define BOOST_HAS_UNISTD_H # define BOOST_HAS_UNISTD_H
# include <boost/config/posix_features.hpp> # include <boost/config/detail/posix_features.hpp>
// S60 SDK defines _POSIX_VERSION as POSIX.1 // S60 SDK defines _POSIX_VERSION as POSIX.1
# ifndef BOOST_HAS_STDINT_H # ifndef BOOST_HAS_STDINT_H
# define BOOST_HAS_STDINT_H # define BOOST_HAS_STDINT_H

View file

@ -180,7 +180,7 @@
// Luckily, at the moment there seems to be none! // Luckily, at the moment there seems to be none!
#endif #endif
// These #defines allow posix_features to work, since vxWorks doesn't // These #defines allow detail/posix_features to work, since vxWorks doesn't
// #define them itself for DKMs (for RTPs on the contrary it does): // #define them itself for DKMs (for RTPs on the contrary it does):
#ifdef _WRS_KERNEL #ifdef _WRS_KERNEL
# ifndef _POSIX_TIMERS # ifndef _POSIX_TIMERS
@ -286,10 +286,8 @@ inline ssize_t readlink(const char*, char*, size_t){
return -1; return -1;
} }
// vxWorks claims to implement gettimeofday in sys/time.h #if (_WRS_VXWORKS_MAJOR < 7)
// but nevertheless does not provide it! See
// https://support.windriver.com/olsPortal/faces/maintenance/techtipDetail_noHeader.jspx?docId=16442&contentId=WR_TECHTIP_006256
// We implement a surrogate version here via clock_gettime:
inline int gettimeofday(struct timeval *tv, void * /*tzv*/) { inline int gettimeofday(struct timeval *tv, void * /*tzv*/) {
struct timespec ts; struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts); clock_gettime(CLOCK_MONOTONIC, &ts);
@ -297,6 +295,8 @@ inline int gettimeofday(struct timeval *tv, void * /*tzv*/) {
tv->tv_usec = ts.tv_nsec / 1000; tv->tv_usec = ts.tv_nsec / 1000;
return 0; return 0;
} }
#endif
// vxWorks does provide neither struct tms nor function times()! // vxWorks does provide neither struct tms nor function times()!
// We implement an empty dummy-function, simply setting the user // We implement an empty dummy-function, simply setting the user
@ -327,6 +327,7 @@ inline clock_t times(struct tms *t){
return ticks; return ticks;
} }
extern void bzero (void *, size_t); // FD_ZERO uses bzero() but doesn't include strings.h
} // extern "C" } // extern "C"
// Put the selfmade functions into the std-namespace, just in case // Put the selfmade functions into the std-namespace, just in case
@ -349,21 +350,43 @@ namespace std {
// Include signal.h which might contain a typo to be corrected here // Include signal.h which might contain a typo to be corrected here
#include <signal.h> #include <signal.h>
#define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway! inline int getpagesize() { return sysconf(_SC_PAGESIZE); } // getpagesize is deprecated anyway!
#ifndef S_ISSOCK #ifndef S_ISSOCK
# define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket? # define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket?
#endif #endif
#define lstat(p, b) stat(p, b) // lstat() == stat(), as vxWorks has no symlinks! inline int lstat(p, b) { return stat(p, b); } // lstat() == stat(), as vxWorks has no symlinks!
#ifndef FPE_FLTINV #ifndef FPE_FLTINV
# define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy # define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy
#endif #endif
#if !defined(BUS_ADRALN) && defined(BUS_ADRALNR) #if !defined(BUS_ADRALN) && defined(BUS_ADRALNR)
# define BUS_ADRALN BUS_ADRALNR // Correct a supposed typo in vxWorks' <signal.h> # define BUS_ADRALN BUS_ADRALNR // Correct a supposed typo in vxWorks' <signal.h>
#endif #endif
//typedef int locale_t; // locale_t is a POSIX-extension, currently unpresent in vxWorks! typedef int locale_t; // locale_t is a POSIX-extension, currently not present in vxWorks!
// #include boilerplate code: // #include boilerplate code:
#include <boost/config/posix_features.hpp> #include <boost/config/detail/posix_features.hpp>
// vxWorks lies about XSI conformance, there is no nl_types.h: // vxWorks lies about XSI conformance, there is no nl_types.h:
#undef BOOST_HAS_NL_TYPES_H #undef BOOST_HAS_NL_TYPES_H
// vxWorks 7 adds C++11 support
// however it is optional, and does not match exactly the support determined
// by examining Dinkum STL version and GCC version (or ICC and DCC)
#ifndef _WRS_CONFIG_LANG_LIB_CPLUS_CPLUS_USER_2011
# define BOOST_NO_CXX11_HDR_ARRAY
# define BOOST_NO_CXX11_HDR_TYPEINDEX
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
# define BOOST_NO_CXX11_HDR_TUPLE
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_STD_ALIGN
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
# define BOOST_NO_CXX11_HDR_ATOMIC
#else
# define BOOST_NO_CXX11_NULLPTR
#endif

View file

@ -0,0 +1,32 @@
// Copyright (c) 2017 Dynatrace
//
// 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 for most recent version.
// Platform setup for IBM z/OS.
#define BOOST_PLATFORM "IBM z/OS"
#include <features.h> // For __UU, __C99, __TR1, ...
#if defined(__UU)
# define BOOST_HAS_GETTIMEOFDAY
#endif
#if defined(_OPEN_THREADS) || defined(__SUSV3_THR)
# define BOOST_HAS_PTHREADS
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
# define BOOST_HAS_THREADS
#endif
#if defined(__SUSV3) || defined(__SUSV3_THR)
# define BOOST_HAS_SCHED_YIELD
#endif
#define BOOST_HAS_SIGACTION
#define BOOST_HAS_UNISTD_H
#define BOOST_HAS_DIRENT_H
#define BOOST_HAS_NL_TYPES_H

View file

@ -147,6 +147,13 @@
# define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_STD_ALIGN
#endif #endif
// Before 650 std::pointer_traits has a broken rebind template
#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 650
# define BOOST_NO_CXX11_POINTER_TRAITS
#elif defined(BOOST_MSVC) && BOOST_MSVC < 1910
# define BOOST_NO_CXX11_POINTER_TRAITS
#endif
#if defined(__has_include) #if defined(__has_include)
#if !__has_include(<shared_mutex>) #if !__has_include(<shared_mutex>)
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX # define BOOST_NO_CXX14_HDR_SHARED_MUTEX
@ -163,9 +170,12 @@
#endif #endif
// C++17 features // C++17 features
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(BOOST_MSVC) || (BOOST_MSVC < 1910) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0)
# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_APPLY
#endif
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) #if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650)
# define BOOST_NO_CXX17_STD_INVOKE # define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS
#endif #endif
#if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400) #if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400)
@ -188,11 +198,14 @@
#endif #endif
#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 650) #if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 650)
// If _HAS_AUTO_PTR_ETC is defined to 0, std::auto_ptr is not available. // If _HAS_AUTO_PTR_ETC is defined to 0, std::auto_ptr and std::random_shuffle are not available.
// See https://www.visualstudio.com/en-us/news/vs2015-vs.aspx#C++ // See https://www.visualstudio.com/en-us/news/vs2015-vs.aspx#C++
// and http://blogs.msdn.com/b/vcblog/archive/2015/06/19/c-11-14-17-features-in-vs-2015-rtm.aspx // and http://blogs.msdn.com/b/vcblog/archive/2015/06/19/c-11-14-17-features-in-vs-2015-rtm.aspx
# if defined(_HAS_AUTO_PTR_ETC) && (_HAS_AUTO_PTR_ETC == 0) # if defined(_HAS_AUTO_PTR_ETC) && (_HAS_AUTO_PTR_ETC == 0)
# define BOOST_NO_AUTO_PTR # define BOOST_NO_AUTO_PTR
# define BOOST_NO_CXX98_RANDOM_SHUFFLE
# define BOOST_NO_CXX98_FUNCTION_BASE
# define BOOST_NO_CXX98_BINDERS
# endif # endif
#endif #endif

View file

@ -55,6 +55,7 @@
# define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_FUNCTIONAL
@ -78,6 +79,7 @@
// C++17 features // C++17 features
# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE # define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS
// //
// Intrinsic type_traits support. // Intrinsic type_traits support.

View file

@ -29,6 +29,7 @@
// aliases since members rebind_alloc and rebind_traits require it. // aliases since members rebind_alloc and rebind_traits require it.
#if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES) #if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES)
# define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
#endif #endif
#if __cplusplus < 201103 #if __cplusplus < 201103
@ -53,6 +54,7 @@
# define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_FUNCTIONAL
# define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_STD_ALIGN
@ -91,6 +93,17 @@
#if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L) #if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L)
# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_APPLY
#endif #endif
#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
# define BOOST_NO_AUTO_PTR
#endif
#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE)
# define BOOST_NO_CXX98_RANDOM_SHUFFLE
#endif
#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
# define BOOST_NO_CXX98_BINDERS
#endif
#define BOOST_NO_CXX17_ITERATOR_TRAITS
#if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL) #if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
// This is a bit of a sledgehammer, because really it's just libc++abi that has no // This is a bit of a sledgehammer, because really it's just libc++abi that has no

View file

@ -143,6 +143,37 @@
# define BOOST_LIBSTDCXX_VERSION 40300 # define BOOST_LIBSTDCXX_VERSION 40300
#endif #endif
#if (BOOST_LIBSTDCXX_VERSION < 50100)
// libstdc++ does not define this function as it's deprecated in C++11, but clang still looks for it,
// defining it here is a terrible cludge, but should get things working:
extern "C" char *gets (char *__s);
#endif
//
// clang is unable to parse some GCC headers, add those workarounds here:
//
#if BOOST_LIBSTDCXX_VERSION < 50000
# define BOOST_NO_CXX11_HDR_REGEX
#endif
//
// GCC 4.7.x has no __cxa_thread_atexit which
// thread_local objects require for cleanup:
//
#if BOOST_LIBSTDCXX_VERSION < 40800
# define BOOST_NO_CXX11_THREAD_LOCAL
#endif
//
// Early clang versions can handle <chrono>, not exactly sure which versions
// but certainly up to clang-3.8 and gcc-4.6:
//
#if (__clang_major__ < 5)
# if BOOST_LIBSTDCXX_VERSION < 40800
# define BOOST_NO_CXX11_HDR_FUTURE
# define BOOST_NO_CXX11_HDR_MUTEX
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
# define BOOST_NO_CXX11_HDR_CHRONO
# endif
#endif
// //
// GCC 4.8 and 9 add working versions of <atomic> and <regex> respectively. // GCC 4.8 and 9 add working versions of <atomic> and <regex> respectively.
// However, we have no test for these as the headers were present but broken // However, we have no test for these as the headers were present but broken
@ -216,6 +247,7 @@
#if (BOOST_LIBSTDCXX_VERSION < 40600) || !defined(BOOST_LIBSTDCXX11) #if (BOOST_LIBSTDCXX_VERSION < 40600) || !defined(BOOST_LIBSTDCXX11)
# define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_TYPEINDEX
# define BOOST_NO_CXX11_ADDRESSOF # define BOOST_NO_CXX11_ADDRESSOF
# define BOOST_NO_CXX17_ITERATOR_TRAITS
#endif #endif
// C++0x features in GCC 4.7.0 and later // C++0x features in GCC 4.7.0 and later
@ -225,6 +257,7 @@
// so 4.7.0 is the first truly conforming one. // so 4.7.0 is the first truly conforming one.
# define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CHRONO
# define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
#endif #endif
// C++0x features in GCC 4.8.0 and later // C++0x features in GCC 4.8.0 and later
// //

View file

@ -44,6 +44,7 @@
# define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_FUNCTIONAL
@ -67,6 +68,7 @@
// C++17 features // C++17 features
# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE # define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS
#define BOOST_STDLIB "Modena C++ standard library" #define BOOST_STDLIB "Modena C++ standard library"

View file

@ -34,7 +34,7 @@
# define BOOST_HAS_UNISTD_H # define BOOST_HAS_UNISTD_H
# endif # endif
// boilerplate code: // boilerplate code:
# include <boost/config/posix_features.hpp> # include <boost/config/detail/posix_features.hpp>
#endif #endif
#if defined(_MWMT) || _MSL_THREADSAFE #if defined(_MWMT) || _MSL_THREADSAFE
@ -68,6 +68,7 @@
# define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_FUNCTIONAL
@ -91,5 +92,6 @@
// C++17 features // C++17 features
# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE # define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS
#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__) #define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__)

View file

@ -180,6 +180,7 @@
# define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_FUNCTIONAL
@ -203,3 +204,4 @@
// C++17 features // C++17 features
# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE # define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS

View file

@ -138,6 +138,7 @@
# define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_FUNCTIONAL
@ -161,5 +162,6 @@
// C++17 features // C++17 features
# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE # define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS
#define BOOST_STDLIB "SGI standard library" #define BOOST_STDLIB "SGI standard library"

View file

@ -228,6 +228,7 @@ namespace boost { using std::min; using std::max; }
# define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_FUNCTIONAL
@ -251,5 +252,6 @@ namespace boost { using std::min; using std::max; }
// C++17 features // C++17 features
# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE # define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS
#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT) #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)

View file

@ -44,6 +44,7 @@
# define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_FUNCTIONAL
@ -67,5 +68,6 @@
// C++17 features // C++17 features
# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE # define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS
#define BOOST_STDLIB "Visual Age default standard library" #define BOOST_STDLIB "Visual Age default standard library"

View file

@ -0,0 +1,60 @@
// Copyright (c) 2017 Dynatrace
//
// 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 for most recent version.
// Standard library setup for IBM z/OS XL C/C++ compiler.
// Oldest library version currently supported is 2.1 (V2R1)
#if __TARGET_LIB__ < 0x42010000
# error "Library version not supported or configured - please reconfigure"
#endif
#if __TARGET_LIB__ > 0x42010000
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown library version - please run the configure tests and report the results"
# endif
#endif
#define BOOST_STDLIB "IBM z/OS XL C/C++ standard library"
#define BOOST_HAS_MACRO_USE_FACET
#define BOOST_NO_CXX11_HDR_TYPE_TRAITS
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
#define BOOST_NO_CXX11_ADDRESSOF
#define BOOST_NO_CXX11_SMART_PTR
#define BOOST_NO_CXX11_ATOMIC_SMART_PTR
#define BOOST_NO_CXX11_NUMERIC_LIMITS
#define BOOST_NO_CXX11_ALLOCATOR
#define BOOST_NO_CXX11_POINTER_TRAITS
#define BOOST_NO_CXX11_HDR_FUNCTIONAL
#define BOOST_NO_CXX11_HDR_UNORDERED_SET
#define BOOST_NO_CXX11_HDR_UNORDERED_MAP
#define BOOST_NO_CXX11_HDR_TYPEINDEX
#define BOOST_NO_CXX11_HDR_TUPLE
#define BOOST_NO_CXX11_HDR_THREAD
#define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
#define BOOST_NO_CXX11_HDR_REGEX
#define BOOST_NO_CXX11_HDR_RATIO
#define BOOST_NO_CXX11_HDR_RANDOM
#define BOOST_NO_CXX11_HDR_MUTEX
#define BOOST_NO_CXX11_HDR_FUTURE
#define BOOST_NO_CXX11_HDR_FORWARD_LIST
#define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
#define BOOST_NO_CXX11_HDR_CODECVT
#define BOOST_NO_CXX11_HDR_CHRONO
#define BOOST_NO_CXX11_HDR_ATOMIC
#define BOOST_NO_CXX11_HDR_ARRAY
#define BOOST_NO_CXX11_STD_ALIGN
#define BOOST_NO_CXX14_STD_EXCHANGE
#define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#define BOOST_NO_CXX17_STD_INVOKE
#define BOOST_NO_CXX17_STD_APPLY
#define BOOST_NO_CXX17_ITERATOR_TRAITS

277
boost/config/workaround.hpp Normal file
View file

@ -0,0 +1,277 @@
// Copyright David Abrahams 2002.
// 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)
#ifndef BOOST_CONFIG_WORKAROUND_HPP
#define BOOST_CONFIG_WORKAROUND_HPP
// Compiler/library version workaround macro
//
// Usage:
//
// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
// // workaround for eVC4 and VC6
// ... // workaround code here
// #endif
//
// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the
// first argument must be undefined or expand to a numeric
// value. The above expands to:
//
// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300
//
// When used for workarounds that apply to the latest known version
// and all earlier versions of a compiler, the following convention
// should be observed:
//
// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301))
//
// The version number in this case corresponds to the last version in
// which the workaround was known to have been required. When
// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro
// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates
// the workaround for any version of the compiler. When
// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or
// error will be issued if the compiler version exceeds the argument
// to BOOST_TESTED_AT(). This can be used to locate workarounds which
// may be obsoleted by newer versions.
#ifndef BOOST_STRICT_CONFIG
#include <boost/config.hpp>
#ifndef __BORLANDC__
#define __BORLANDC___WORKAROUND_GUARD 1
#else
#define __BORLANDC___WORKAROUND_GUARD 0
#endif
#ifndef __CODEGEARC__
#define __CODEGEARC___WORKAROUND_GUARD 1
#else
#define __CODEGEARC___WORKAROUND_GUARD 0
#endif
#ifndef _MSC_VER
#define _MSC_VER_WORKAROUND_GUARD 1
#else
#define _MSC_VER_WORKAROUND_GUARD 0
#endif
#ifndef _MSC_FULL_VER
#define _MSC_FULL_VER_WORKAROUND_GUARD 1
#else
#define _MSC_FULL_VER_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_MSVC
#define BOOST_MSVC_WORKAROUND_GUARD 1
#else
#define BOOST_MSVC_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_MSVC_FULL_VER
#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1
#else
#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0
#endif
#ifndef __GNUC__
#define __GNUC___WORKAROUND_GUARD 1
#else
#define __GNUC___WORKAROUND_GUARD 0
#endif
#ifndef __GNUC_MINOR__
#define __GNUC_MINOR___WORKAROUND_GUARD 1
#else
#define __GNUC_MINOR___WORKAROUND_GUARD 0
#endif
#ifndef __GNUC_PATCHLEVEL__
#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1
#else
#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0
#endif
#ifndef BOOST_GCC
#define BOOST_GCC_WORKAROUND_GUARD 1
#else
#define BOOST_GCC_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_XLCPP_ZOS
#define BOOST_XLCPP_ZOS_WORKAROUND_GUARD 1
#else
#define BOOST_XLCPP_ZOS_WORKAROUND_GUARD 0
#endif
#ifndef __IBMCPP__
#define __IBMCPP___WORKAROUND_GUARD 1
#else
#define __IBMCPP___WORKAROUND_GUARD 0
#endif
#ifndef __SUNPRO_CC
#define __SUNPRO_CC_WORKAROUND_GUARD 1
#else
#define __SUNPRO_CC_WORKAROUND_GUARD 0
#endif
#ifndef __DECCXX_VER
#define __DECCXX_VER_WORKAROUND_GUARD 1
#else
#define __DECCXX_VER_WORKAROUND_GUARD 0
#endif
#ifndef __MWERKS__
#define __MWERKS___WORKAROUND_GUARD 1
#else
#define __MWERKS___WORKAROUND_GUARD 0
#endif
#ifndef __EDG__
#define __EDG___WORKAROUND_GUARD 1
#else
#define __EDG___WORKAROUND_GUARD 0
#endif
#ifndef __EDG_VERSION__
#define __EDG_VERSION___WORKAROUND_GUARD 1
#else
#define __EDG_VERSION___WORKAROUND_GUARD 0
#endif
#ifndef __HP_aCC
#define __HP_aCC_WORKAROUND_GUARD 1
#else
#define __HP_aCC_WORKAROUND_GUARD 0
#endif
#ifndef __hpxstd98
#define __hpxstd98_WORKAROUND_GUARD 1
#else
#define __hpxstd98_WORKAROUND_GUARD 0
#endif
#ifndef _CRAYC
#define _CRAYC_WORKAROUND_GUARD 1
#else
#define _CRAYC_WORKAROUND_GUARD 0
#endif
#ifndef __DMC__
#define __DMC___WORKAROUND_GUARD 1
#else
#define __DMC___WORKAROUND_GUARD 0
#endif
#ifndef MPW_CPLUS
#define MPW_CPLUS_WORKAROUND_GUARD 1
#else
#define MPW_CPLUS_WORKAROUND_GUARD 0
#endif
#ifndef __COMO__
#define __COMO___WORKAROUND_GUARD 1
#else
#define __COMO___WORKAROUND_GUARD 0
#endif
#ifndef __COMO_VERSION__
#define __COMO_VERSION___WORKAROUND_GUARD 1
#else
#define __COMO_VERSION___WORKAROUND_GUARD 0
#endif
#ifndef __INTEL_COMPILER
#define __INTEL_COMPILER_WORKAROUND_GUARD 1
#else
#define __INTEL_COMPILER_WORKAROUND_GUARD 0
#endif
#ifndef __ICL
#define __ICL_WORKAROUND_GUARD 1
#else
#define __ICL_WORKAROUND_GUARD 0
#endif
#ifndef _COMPILER_VERSION
#define _COMPILER_VERSION_WORKAROUND_GUARD 1
#else
#define _COMPILER_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef _RWSTD_VER
#define _RWSTD_VER_WORKAROUND_GUARD 1
#else
#define _RWSTD_VER_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_RWSTD_VER
#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1
#else
#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0
#endif
#ifndef __GLIBCPP__
#define __GLIBCPP___WORKAROUND_GUARD 1
#else
#define __GLIBCPP___WORKAROUND_GUARD 0
#endif
#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1
#else
#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0
#endif
#ifndef __SGI_STL_PORT
#define __SGI_STL_PORT_WORKAROUND_GUARD 1
#else
#define __SGI_STL_PORT_WORKAROUND_GUARD 0
#endif
#ifndef _STLPORT_VERSION
#define _STLPORT_VERSION_WORKAROUND_GUARD 1
#else
#define _STLPORT_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef __LIBCOMO_VERSION__
#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1
#else
#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0
#endif
#ifndef _CPPLIB_VER
#define _CPPLIB_VER_WORKAROUND_GUARD 1
#else
#define _CPPLIB_VER_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_INTEL_CXX_VERSION
#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1
#else
#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_INTEL_WIN
#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1
#else
#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_DINKUMWARE_STDLIB
#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1
#else
#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_INTEL
#define BOOST_INTEL_WORKAROUND_GUARD 1
#else
#define BOOST_INTEL_WORKAROUND_GUARD 0
#endif
// Always define to zero, if it's used it'll be defined my MPL:
#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0
#define BOOST_WORKAROUND(symbol, test) \
((symbol ## _WORKAROUND_GUARD + 0 == 0) && \
(symbol != 0) && (1 % (( (symbol test) ) + 1)))
// ^ ^ ^ ^
// The extra level of parenthesis nesting above, along with the
// BOOST_OPEN_PAREN indirection below, is required to satisfy the
// broken preprocessor in MWCW 8.3 and earlier.
//
// The basic mechanism works as follows:
// (symbol test) + 1 => if (symbol test) then 2 else 1
// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0
//
// The complication with % is for cooperation with BOOST_TESTED_AT().
// When "test" is BOOST_TESTED_AT(x) and
// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined,
//
// symbol test => if (symbol <= x) then 1 else -1
// (symbol test) + 1 => if (symbol <= x) then 2 else 0
// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero
//
#ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS
# define BOOST_OPEN_PAREN (
# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1
#else
# define BOOST_TESTED_AT(value) != ((value)-(value))
#endif
#else
#define BOOST_WORKAROUND(symbol, test) 0
#endif
#endif // BOOST_CONFIG_WORKAROUND_HPP

View file

@ -347,7 +347,7 @@ struct allocator_traits
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
//! <b>Effects</b>: calls <code>a.construct(p, std::forward<Args>(args)...)</code> if that call is well-formed; //! <b>Effects</b>: calls <code>a.construct(p, std::forward<Args>(args)...)</code> if that call is well-formed;
//! otherwise, invokes <code>::new (static_cast<void*>(p)) T(std::forward<Args>(args)...)</code> //! otherwise, invokes <code>`placement new` (static_cast<void*>(p)) T(std::forward<Args>(args)...)</code>
template <class T, class ...Args> template <class T, class ...Args>
BOOST_CONTAINER_FORCEINLINE static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args) BOOST_CONTAINER_FORCEINLINE static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args)
{ {

View file

@ -31,7 +31,7 @@
#include <boost/container/detail/type_traits.hpp> #include <boost/container/detail/type_traits.hpp>
#include <boost/container/detail/iterator.hpp> #include <boost/container/detail/iterator.hpp>
#include <boost/container/detail/iterators.hpp> #include <boost/container/detail/iterators.hpp>
#include <boost/container/detail/iterator_to_raw_pointer.hpp> #include <boost/move/detail/iterator_to_raw_pointer.hpp>
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#include <boost/move/detail/fwd_macros.hpp> #include <boost/move/detail/fwd_macros.hpp>
#endif #endif
@ -157,13 +157,13 @@ struct insert_copy_proxy
void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
{ {
BOOST_ASSERT(n == 1); (void)n; BOOST_ASSERT(n == 1); (void)n;
alloc_traits::construct( a, iterator_to_raw_pointer(p), v_); alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), v_);
} }
void copy_n_and_update(Allocator &, Iterator p, size_type n) const void copy_n_and_update(Allocator &, Iterator p, size_type n) const
{ {
BOOST_ASSERT(n == 1); (void)n; BOOST_ASSERT(n == 1); (void)n;
*p =v_; *p = v_;
} }
const value_type &v_; const value_type &v_;
@ -184,7 +184,7 @@ struct insert_move_proxy
void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
{ {
BOOST_ASSERT(n == 1); (void)n; BOOST_ASSERT(n == 1); (void)n;
alloc_traits::construct( a, iterator_to_raw_pointer(p), ::boost::move(v_) ); alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::move(v_) );
} }
void copy_n_and_update(Allocator &, Iterator p, size_type n) const void copy_n_and_update(Allocator &, Iterator p, size_type n) const
@ -240,7 +240,7 @@ struct insert_nonmovable_emplace_proxy
void priv_uninitialized_copy_some_and_update(Allocator &a, const index_tuple<IdxPack...>&, Iterator p, size_type n) void priv_uninitialized_copy_some_and_update(Allocator &a, const index_tuple<IdxPack...>&, Iterator p, size_type n)
{ {
BOOST_ASSERT(n == 1); (void)n; BOOST_ASSERT(n == 1); (void)n;
alloc_traits::construct( a, iterator_to_raw_pointer(p), ::boost::forward<Args>(get<IdxPack>(this->args_))... ); alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::forward<Args>(get<IdxPack>(this->args_))... );
} }
protected: protected:
@ -354,7 +354,7 @@ struct insert_nonmovable_emplace_proxy##N\
void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n)\ void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n)\
{\ {\
BOOST_ASSERT(n == 1); (void)n;\ BOOST_ASSERT(n == 1); (void)n;\
alloc_traits::construct(a, iterator_to_raw_pointer(p) BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\ alloc_traits::construct(a, boost::movelib::iterator_to_raw_pointer(p) BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\
}\ }\
\ \
void copy_n_and_update(Allocator &, Iterator, size_type)\ void copy_n_and_update(Allocator &, Iterator, size_type)\

View file

@ -29,6 +29,128 @@ namespace container {
using boost::intrusive::algo_equal; using boost::intrusive::algo_equal;
using boost::intrusive::algo_lexicographical_compare; using boost::intrusive::algo_lexicographical_compare;
template<class Func>
class binder1st
{
public:
typedef typename Func::second_argument_type argument_type;
typedef typename Func::result_type result_type;
binder1st(const Func& func, const typename Func::first_argument_type& arg)
: op(func), value(arg)
{}
result_type operator()(const argument_type& arg) const
{ return op(value, arg); }
result_type operator()(argument_type& arg) const
{ return op(value, arg); }
private:
Func op;
typename Func::first_argument_type value;
};
template<class Func, class T>
inline binder1st<Func> bind1st(const Func& func, const T& arg)
{ return boost::container::binder1st<Func>(func, arg); }
template<class Func>
class binder2nd
{
public:
typedef typename Func::first_argument_type argument_type;
typedef typename Func::result_type result_type;
binder2nd(const Func& func, const typename Func::second_argument_type& arg)
: op(func), value(arg)
{}
result_type operator()(const argument_type& arg) const
{ return op(arg, value); }
result_type operator()(argument_type& arg) const
{ return op(arg, value); }
private:
Func op;
typename Func::second_argument_type value;
};
template<class Func, class T>
inline binder2nd<Func> bind2nd(const Func& func, const T& arg)
{
return (boost::container::binder2nd<Func>(func, arg));
}
template<class Func>
class unary_negate
{
public:
typedef typename Func::argument_type argument_type;
typedef typename Func::result_type result_type;
explicit unary_negate(const Func& func)
: m_func(func)
{}
bool operator()(const typename Func::argument_type& arg) const
{ return !m_func(arg); }
private:
Func m_func;
};
template<class Func> inline
unary_negate<Func> not1(const Func& func)
{
return boost::container::unary_negate<Func>(func);
}
template<class InputIt, class UnaryPredicate>
InputIt find_if(InputIt first, InputIt last, UnaryPredicate p)
{
for (; first != last; ++first) {
if (p(*first)) {
return first;
}
}
return last;
}
template<class InputIt, class ForwardIt, class BinaryPredicate>
InputIt find_first_of(InputIt first1, InputIt last1, ForwardIt first2, ForwardIt last2, BinaryPredicate p)
{
for (; first1 != last1; ++first1) {
for (ForwardIt it = first2; it != last2; ++it) {
if (p(*first1, *it)) {
return first1;
}
}
}
return last1;
}
template<class ForwardIt1, class ForwardIt2, class BinaryPredicate>
ForwardIt1 search(ForwardIt1 first1, ForwardIt1 last1,
ForwardIt2 first2, ForwardIt2 last2, BinaryPredicate p)
{
for (; ; ++first1) {
ForwardIt1 it = first1;
for (ForwardIt2 it2 = first2; ; ++it, ++it2) {
if (it2 == last2) {
return first1;
}
if (it == last1) {
return last1;
}
if (!p(*it, *it2)) {
break;
}
}
}
}
} //namespace container { } //namespace container {
} //namespace boost { } //namespace boost {

View file

@ -0,0 +1,49 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2017-2017. 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/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP
#define BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#include <boost/container/allocator_traits.hpp>
#include <boost/container/detail/container_rebind.hpp>
#include <boost/container/detail/is_container.hpp>
namespace boost {
namespace container {
namespace container_detail {
template<class AllocatorOrContainer, class ToType, bool = is_container<AllocatorOrContainer>::value>
struct container_or_allocator_rebind_impl
: container_rebind<AllocatorOrContainer, ToType>
{};
template<class AllocatorOrContainer, class ToType>
struct container_or_allocator_rebind_impl<AllocatorOrContainer, ToType, false>
: allocator_traits<AllocatorOrContainer>::template portable_rebind_alloc<ToType>
{};
template<class AllocatorOrContainer, class ToType>
struct container_or_allocator_rebind
: container_or_allocator_rebind_impl<AllocatorOrContainer, ToType>
{};
} //namespace container_detail {
} //namespace container {
} //namespace boost {
#endif //#ifndef BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP

View file

@ -0,0 +1,258 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2017-2017. 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/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_CONTAINER_DETAIL_CONTAINER_REBIND_HPP
#define BOOST_CONTAINER_DETAIL_CONTAINER_REBIND_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#include <boost/container/allocator_traits.hpp>
namespace boost {
namespace container {
namespace container_detail {
template <class Cont, class U>
struct container_rebind;
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <template <class, class, class...> class Cont, typename V, typename A, class... An, class U>
struct container_rebind<Cont<V, A, An...>, U>
{
typedef Cont<U, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, An...> type;
};
//Needed for non-conforming compilers like GCC 4.3
template <template <class, class> class Cont, typename V, typename A, class U>
struct container_rebind<Cont<V, A>, U>
{
typedef Cont<U, typename allocator_traits<A>::template portable_rebind_alloc<U>::type> type;
};
template <template <class> class Cont, typename V, class U>
struct container_rebind<Cont<V>, U>
{
typedef Cont<U> type;
};
//for small_vector,static_vector
template <template <class, std::size_t, class, class...> class Cont, typename V, std::size_t N, typename A, class... An, class U>
struct container_rebind<Cont<V, N, A, An...>, U>
{
typedef Cont<U, N, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, An...> type;
};
//Needed for non-conforming compilers like GCC 4.3
template <template <class, std::size_t, class> class Cont, typename V, std::size_t N, typename A, class U>
struct container_rebind<Cont<V, N, A>, U>
{
typedef Cont<U, N, typename allocator_traits<A>::template portable_rebind_alloc<U>::type> type;
};
template <template <class, std::size_t> class Cont, typename V, std::size_t N, class U>
struct container_rebind<Cont<V, N>, U>
{
typedef Cont<U, N> type;
};
#else //C++03 compilers
template <template <class> class Cont //0arg
, typename V
, class U>
struct container_rebind<Cont<V>, U>
{
typedef Cont<U> type;
};
template <template <class, class> class Cont //0arg
, typename V, typename A
, class U>
struct container_rebind<Cont<V, A>, U>
{
typedef Cont<U, typename allocator_traits<A>::template portable_rebind_alloc<U>::type> type;
};
template <template <class, class, class> class Cont //1arg
, typename V, typename A, class P0
, class U>
struct container_rebind<Cont<V, A, P0>, U>
{
typedef Cont<U, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0> type;
};
template <template <class, class, class, class> class Cont //2arg
, typename V, typename A, class P0, class P1
, class U>
struct container_rebind<Cont<V, A, P0, P1>, U>
{
typedef Cont<U, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1> type;
};
template <template <class, class, class, class, class> class Cont //3arg
, typename V, typename A, class P0, class P1, class P2
, class U>
struct container_rebind<Cont<V, A, P0, P1, P2>, U>
{
typedef Cont<U, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1, P2> type;
};
template <template <class, class, class, class, class, class> class Cont //4arg
, typename V, typename A, class P0, class P1, class P2, class P3
, class U>
struct container_rebind<Cont<V, A, P0, P1, P2, P3>, U>
{
typedef Cont<U, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1, P2, P3> type;
};
template <template <class, class, class, class, class, class, class> class Cont //5arg
, typename V, typename A, class P0, class P1, class P2, class P3, class P4
, class U>
struct container_rebind<Cont<V, A, P0, P1, P2, P3, P4>, U>
{
typedef Cont<U, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1, P2, P3, P4> type;
};
template <template <class, class, class, class, class, class, class, class> class Cont //6arg
, typename V, typename A, class P0, class P1, class P2, class P3, class P4, class P5
, class U>
struct container_rebind<Cont<V, A, P0, P1, P2, P3, P4, P5>, U>
{
typedef Cont<U, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1, P2, P3, P4, P5> type;
};
template <template <class, class, class, class, class, class, class, class, class> class Cont //7arg
, typename V, typename A, class P0, class P1, class P2, class P3, class P4, class P5, class P6
, class U>
struct container_rebind<Cont<V, A, P0, P1, P2, P3, P4, P5, P6>, U>
{
typedef Cont<U, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1, P2, P3, P4, P5, P6> type;
};
template <template <class, class, class, class, class, class, class, class, class, class> class Cont //8arg
, typename V, typename A, class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7
, class U>
struct container_rebind<Cont<V, A, P0, P1, P2, P3, P4, P5, P6, P7>, U>
{
typedef Cont<U, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1, P2, P3, P4, P5, P6, P7> type;
};
template <template <class, class, class, class, class, class, class, class, class, class, class> class Cont //9arg
, typename V, typename A, class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8
, class U>
struct container_rebind<Cont<V, A, P0, P1, P2, P3, P4, P5, P6, P7, P8>, U>
{
typedef Cont<U, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1, P2, P3, P4, P5, P6, P7, P8> type;
};
//For small_vector/static_vector
template <template <class, std::size_t> class Cont //0arg
, typename V, std::size_t N
, class U>
struct container_rebind<Cont<V, N>, U>
{
typedef Cont<U, N> type;
};
template <template <class, std::size_t, class> class Cont //0arg
, typename V, std::size_t N, typename A
, class U>
struct container_rebind<Cont<V, N, A>, U>
{
typedef Cont<U, N, typename allocator_traits<A>::template portable_rebind_alloc<U>::type> type;
};
template <template <class, std::size_t, class, class> class Cont //1arg
, typename V, std::size_t N, typename A, class P0
, class U>
struct container_rebind<Cont<V, N, A, P0>, U>
{
typedef Cont<U, N, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0> type;
};
template <template <class, std::size_t, class, class, class> class Cont //2arg
, typename V, std::size_t N, typename A, class P0, class P1
, class U>
struct container_rebind<Cont<V, N, A, P0, P1>, U>
{
typedef Cont<U, N, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1> type;
};
template <template <class, std::size_t, class, class, class, class> class Cont //3arg
, typename V, std::size_t N, typename A, class P0, class P1, class P2
, class U>
struct container_rebind<Cont<V, N, A, P0, P1, P2>, U>
{
typedef Cont<U, N, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1, P2> type;
};
template <template <class, std::size_t, class, class, class, class, class> class Cont //4arg
, typename V, std::size_t N, typename A, class P0, class P1, class P2, class P3
, class U>
struct container_rebind<Cont<V, N, A, P0, P1, P2, P3>, U>
{
typedef Cont<U, N, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1, P2, P3> type;
};
template <template <class, std::size_t, class, class, class, class, class, class> class Cont //5arg
, typename V, std::size_t N, typename A, class P0, class P1, class P2, class P3, class P4
, class U>
struct container_rebind<Cont<V, N, A, P0, P1, P2, P3, P4>, U>
{
typedef Cont<U, N, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1, P2, P3, P4> type;
};
template <template <class, std::size_t, class, class, class, class, class, class, class> class Cont //6arg
, typename V, std::size_t N, typename A, class P0, class P1, class P2, class P3, class P4, class P5
, class U>
struct container_rebind<Cont<V, N, A, P0, P1, P2, P3, P4, P5>, U>
{
typedef Cont<U, N, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1, P2, P3, P4, P5> type;
};
template <template <class, std::size_t, class, class, class, class, class, class, class, class> class Cont //7arg
, typename V, std::size_t N, typename A, class P0, class P1, class P2, class P3, class P4, class P5, class P6
, class U>
struct container_rebind<Cont<V, N, A, P0, P1, P2, P3, P4, P5, P6>, U>
{
typedef Cont<U, N, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1, P2, P3, P4, P5, P6> type;
};
template <template <class, std::size_t, class, class, class, class, class, class, class, class, class> class Cont //8arg
, typename V, std::size_t N, typename A, class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7
, class U>
struct container_rebind<Cont<V, N, A, P0, P1, P2, P3, P4, P5, P6, P7>, U>
{
typedef Cont<U, N, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1, P2, P3, P4, P5, P6, P7> type;
};
template <template <class, std::size_t, class, class, class, class, class, class, class, class, class, class> class Cont //9arg
, typename V, std::size_t N, typename A, class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8
, class U>
struct container_rebind<Cont<V, N, A, P0, P1, P2, P3, P4, P5, P6, P7, P8>, U>
{
typedef Cont<U, N, typename allocator_traits<A>::template portable_rebind_alloc<U>::type, P0, P1, P2, P3, P4, P5, P6, P7, P8> type;
};
#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
} //namespace container_detail {
} //namespace container {
} //namespace boost {
#endif //#ifndef BOOST_CONTAINER_DETAIL_CONTAINER_REBIND_HPP

View file

@ -22,7 +22,7 @@
#include <boost/container/allocator_traits.hpp> #include <boost/container/allocator_traits.hpp>
// container/detail // container/detail
#include <boost/container/detail/iterator.hpp> #include <boost/container/detail/iterator.hpp>
#include <boost/container/detail/iterator_to_raw_pointer.hpp> #include <boost/move/detail/iterator_to_raw_pointer.hpp>
#include <boost/container/detail/mpl.hpp> #include <boost/container/detail/mpl.hpp>
#include <boost/container/detail/type_traits.hpp> #include <boost/container/detail/type_traits.hpp>
#include <boost/container/detail/construct_in_place.hpp> #include <boost/container/detail/construct_in_place.hpp>
@ -69,16 +69,12 @@ struct are_elements_contiguous< ::boost::move_iterator<It> >
// predeclarations // predeclarations
///////////////////////// /////////////////////////
#ifndef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
template<class Pointer> template<class Pointer>
class vector_iterator; class vector_iterator;
template<class Pointer> template<class Pointer>
class vector_const_iterator; class vector_const_iterator;
#endif //BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
} //namespace container_detail { } //namespace container_detail {
} //namespace container { } //namespace container {
@ -97,8 +93,6 @@ namespace container_detail {
//vector_[const_]iterator //vector_[const_]iterator
///////////////////////// /////////////////////////
#ifndef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
template<class Pointer> template<class Pointer>
struct are_elements_contiguous<boost::container::container_detail::vector_iterator<Pointer> > struct are_elements_contiguous<boost::container::container_detail::vector_iterator<Pointer> >
{ {
@ -111,8 +105,6 @@ struct are_elements_contiguous<boost::container::container_detail::vector_const_
static const bool value = true; static const bool value = true;
}; };
#endif //BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
///////////////////////// /////////////////////////
// offset_ptr // offset_ptr
///////////////////////// /////////////////////////
@ -178,7 +170,7 @@ inline F memmove(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
typedef typename boost::container::iterator_traits<I>::value_type value_type; typedef typename boost::container::iterator_traits<I>::value_type value_type;
typename boost::container::iterator_traits<I>::difference_type n = boost::container::iterator_distance(f, l); typename boost::container::iterator_traits<I>::difference_type n = boost::container::iterator_distance(f, l);
if(n){ if(n){
std::memmove((iterator_to_raw_pointer)(r), (iterator_to_raw_pointer)(f), sizeof(value_type)*n); std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n);
boost::container::iterator_advance(r, n); boost::container::iterator_advance(r, n);
} }
return r; return r;
@ -192,7 +184,7 @@ F memmove_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
{ {
typedef typename boost::container::iterator_traits<I>::value_type value_type; typedef typename boost::container::iterator_traits<I>::value_type value_type;
if(n){ if(n){
std::memmove((iterator_to_raw_pointer)(r), (iterator_to_raw_pointer)(f), sizeof(value_type)*n); std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n);
boost::container::iterator_advance(r, n); boost::container::iterator_advance(r, n);
} }
return r; return r;
@ -206,7 +198,7 @@ I memmove_n_source(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
{ {
if(n){ if(n){
typedef typename boost::container::iterator_traits<I>::value_type value_type; typedef typename boost::container::iterator_traits<I>::value_type value_type;
std::memmove((iterator_to_raw_pointer)(r), (iterator_to_raw_pointer)(f), sizeof(value_type)*n); std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n);
boost::container::iterator_advance(f, n); boost::container::iterator_advance(f, n);
} }
return f; return f;
@ -220,7 +212,7 @@ I memmove_n_source_dest(I f, U n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
{ {
typedef typename boost::container::iterator_traits<I>::value_type value_type; typedef typename boost::container::iterator_traits<I>::value_type value_type;
if(n){ if(n){
std::memmove((iterator_to_raw_pointer)(r), (iterator_to_raw_pointer)(f), sizeof(value_type)*n); std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n);
boost::container::iterator_advance(f, n); boost::container::iterator_advance(f, n);
boost::container::iterator_advance(r, n); boost::container::iterator_advance(r, n);
} }
@ -295,13 +287,13 @@ inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F
F back = r; F back = r;
BOOST_TRY{ BOOST_TRY{
while (f != l) { while (f != l) {
allocator_traits<Allocator>::construct(a, container_detail::iterator_to_raw_pointer(r), boost::move(*f)); allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f));
++f; ++r; ++f; ++r;
} }
} }
BOOST_CATCH(...){ BOOST_CATCH(...){
for (; back != r; ++back){ for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, container_detail::iterator_to_raw_pointer(back)); allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
} }
BOOST_RETHROW; BOOST_RETHROW;
} }
@ -340,13 +332,13 @@ inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F
F back = r; F back = r;
BOOST_TRY{ BOOST_TRY{
while (n--) { while (n--) {
allocator_traits<Allocator>::construct(a, container_detail::iterator_to_raw_pointer(r), boost::move(*f)); allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f));
++f; ++r; ++f; ++r;
} }
} }
BOOST_CATCH(...){ BOOST_CATCH(...){
for (; back != r; ++back){ for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, container_detail::iterator_to_raw_pointer(back)); allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
} }
BOOST_RETHROW; BOOST_RETHROW;
} }
@ -385,13 +377,13 @@ inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F
F back = r; F back = r;
BOOST_TRY{ BOOST_TRY{
while (n--) { while (n--) {
allocator_traits<Allocator>::construct(a, container_detail::iterator_to_raw_pointer(r), boost::move(*f)); allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f));
++f; ++r; ++f; ++r;
} }
} }
BOOST_CATCH(...){ BOOST_CATCH(...){
for (; back != r; ++back){ for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, container_detail::iterator_to_raw_pointer(back)); allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
} }
BOOST_RETHROW; BOOST_RETHROW;
} }
@ -430,13 +422,13 @@ inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F
F back = r; F back = r;
BOOST_TRY{ BOOST_TRY{
while (f != l) { while (f != l) {
allocator_traits<Allocator>::construct(a, container_detail::iterator_to_raw_pointer(r), *f); allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), *f);
++f; ++r; ++f; ++r;
} }
} }
BOOST_CATCH(...){ BOOST_CATCH(...){
for (; back != r; ++back){ for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, container_detail::iterator_to_raw_pointer(back)); allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
} }
BOOST_RETHROW; BOOST_RETHROW;
} }
@ -475,13 +467,13 @@ inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F
F back = r; F back = r;
BOOST_TRY{ BOOST_TRY{
while (n--) { while (n--) {
allocator_traits<Allocator>::construct(a, container_detail::iterator_to_raw_pointer(r), *f); allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), *f);
++f; ++r; ++f; ++r;
} }
} }
BOOST_CATCH(...){ BOOST_CATCH(...){
for (; back != r; ++back){ for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, container_detail::iterator_to_raw_pointer(back)); allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
} }
BOOST_RETHROW; BOOST_RETHROW;
} }
@ -520,13 +512,13 @@ inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F
F back = r; F back = r;
BOOST_TRY{ BOOST_TRY{
while (n--) { while (n--) {
boost::container::construct_in_place(a, container_detail::iterator_to_raw_pointer(r), f); boost::container::construct_in_place(a, boost::movelib::iterator_to_raw_pointer(r), f);
++f; ++r; ++f; ++r;
} }
} }
BOOST_CATCH(...){ BOOST_CATCH(...){
for (; back != r; ++back){ for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, container_detail::iterator_to_raw_pointer(back)); allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
} }
BOOST_RETHROW; BOOST_RETHROW;
} }
@ -564,13 +556,13 @@ inline typename container_detail::disable_if_memzero_initializable<F, F>::type
F back = r; F back = r;
BOOST_TRY{ BOOST_TRY{
while (n--) { while (n--) {
allocator_traits<Allocator>::construct(a, container_detail::iterator_to_raw_pointer(r)); allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r));
++r; ++r;
} }
} }
BOOST_CATCH(...){ BOOST_CATCH(...){
for (; back != r; ++back){ for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, container_detail::iterator_to_raw_pointer(back)); allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
} }
BOOST_RETHROW; BOOST_RETHROW;
} }
@ -585,7 +577,7 @@ inline typename container_detail::enable_if_memzero_initializable<F, F>::type
uninitialized_value_init_alloc_n(Allocator &, typename boost::container::allocator_traits<Allocator>::size_type n, F r) uninitialized_value_init_alloc_n(Allocator &, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
{ {
typedef typename boost::container::iterator_traits<F>::value_type value_type; typedef typename boost::container::iterator_traits<F>::value_type value_type;
std::memset((void*)container_detail::iterator_to_raw_pointer(r), 0, sizeof(value_type)*n); std::memset((void*)boost::movelib::iterator_to_raw_pointer(r), 0, sizeof(value_type)*n);
boost::container::iterator_advance(r, n); boost::container::iterator_advance(r, n);
return r; return r;
} }
@ -611,13 +603,13 @@ inline F uninitialized_default_init_alloc_n(Allocator &a, typename boost::contai
F back = r; F back = r;
BOOST_TRY{ BOOST_TRY{
while (n--) { while (n--) {
allocator_traits<Allocator>::construct(a, container_detail::iterator_to_raw_pointer(r), default_init); allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), default_init);
++r; ++r;
} }
} }
BOOST_CATCH(...){ BOOST_CATCH(...){
for (; back != r; ++back){ for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, container_detail::iterator_to_raw_pointer(back)); allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
} }
BOOST_RETHROW; BOOST_RETHROW;
} }
@ -647,13 +639,13 @@ inline void uninitialized_fill_alloc(Allocator &a, F f, F l, const T &t)
F back = f; F back = f;
BOOST_TRY{ BOOST_TRY{
while (f != l) { while (f != l) {
allocator_traits<Allocator>::construct(a, container_detail::iterator_to_raw_pointer(f), t); allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(f), t);
++f; ++f;
} }
} }
BOOST_CATCH(...){ BOOST_CATCH(...){
for (; back != l; ++back){ for (; back != l; ++back){
allocator_traits<Allocator>::destroy(a, container_detail::iterator_to_raw_pointer(back)); allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
} }
BOOST_RETHROW; BOOST_RETHROW;
} }
@ -683,13 +675,13 @@ inline F uninitialized_fill_alloc_n(Allocator &a, const T &v, typename boost::co
F back = r; F back = r;
BOOST_TRY{ BOOST_TRY{
while (n--) { while (n--) {
allocator_traits<Allocator>::construct(a, container_detail::iterator_to_raw_pointer(r), v); allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), v);
++r; ++r;
} }
} }
BOOST_CATCH(...){ BOOST_CATCH(...){
for (; back != r; ++back){ for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, container_detail::iterator_to_raw_pointer(back)); allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
} }
BOOST_RETHROW; BOOST_RETHROW;
} }
@ -890,7 +882,7 @@ inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, F>
typedef typename boost::container::iterator_traits<I>::value_type value_type; typedef typename boost::container::iterator_traits<I>::value_type value_type;
const typename boost::container::iterator_traits<I>::difference_type n = boost::container::iterator_distance(f, l); const typename boost::container::iterator_traits<I>::difference_type n = boost::container::iterator_distance(f, l);
r -= n; r -= n;
std::memmove((container_detail::iterator_to_raw_pointer)(r), (container_detail::iterator_to_raw_pointer)(f), sizeof(value_type)*n); std::memmove((boost::movelib::iterator_to_raw_pointer)(r), (boost::movelib::iterator_to_raw_pointer)(f), sizeof(value_type)*n);
return r; return r;
} }
@ -963,8 +955,9 @@ template
inline typename container_detail::disable_if_trivially_destructible<I, void>::type inline typename container_detail::disable_if_trivially_destructible<I, void>::type
destroy_alloc_n(Allocator &a, I f, U n) destroy_alloc_n(Allocator &a, I f, U n)
{ {
while(n--){ while(n){
allocator_traits<Allocator>::destroy(a, container_detail::iterator_to_raw_pointer(f)); --n;
allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(f));
++f; ++f;
} }
} }
@ -1021,9 +1014,9 @@ inline typename container_detail::enable_if_c
storage_type storage; storage_type storage;
const std::size_t n_i_bytes = sizeof(value_type)*n_i; const std::size_t n_i_bytes = sizeof(value_type)*n_i;
void *const large_ptr = static_cast<void*>(container_detail::iterator_to_raw_pointer(large_range_f)); void *const large_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(large_range_f));
void *const short_ptr = static_cast<void*>(container_detail::iterator_to_raw_pointer(short_range_f)); void *const short_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(short_range_f));
void *const stora_ptr = static_cast<void*>(container_detail::iterator_to_raw_pointer(storage)); void *const stora_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(storage));
std::memcpy(stora_ptr, large_ptr, n_i_bytes); std::memcpy(stora_ptr, large_ptr, n_i_bytes);
std::memcpy(large_ptr, short_ptr, n_i_bytes); std::memcpy(large_ptr, short_ptr, n_i_bytes);
std::memcpy(short_ptr, stora_ptr, n_i_bytes); std::memcpy(short_ptr, stora_ptr, n_i_bytes);
@ -1052,8 +1045,8 @@ inline typename container_detail::enable_if_c
const std::size_t sizeof_storage = sizeof(storage); const std::size_t sizeof_storage = sizeof(storage);
std::size_t n_i_bytes = sizeof(value_type)*n_i; std::size_t n_i_bytes = sizeof(value_type)*n_i;
char *large_ptr = static_cast<char*>(static_cast<void*>(container_detail::iterator_to_raw_pointer(large_range_f))); char *large_ptr = static_cast<char*>(static_cast<void*>(boost::movelib::iterator_to_raw_pointer(large_range_f)));
char *short_ptr = static_cast<char*>(static_cast<void*>(container_detail::iterator_to_raw_pointer(short_range_f))); char *short_ptr = static_cast<char*>(static_cast<void*>(boost::movelib::iterator_to_raw_pointer(short_range_f)));
char *stora_ptr = static_cast<char*>(static_cast<void*>(&storage)); char *stora_ptr = static_cast<char*>(static_cast<void*>(&storage));
std::size_t szt_times = n_i_bytes/sizeof_storage; std::size_t szt_times = n_i_bytes/sizeof_storage;
@ -1072,21 +1065,21 @@ inline typename container_detail::enable_if_c
std::memcpy(short_ptr, stora_ptr, sizeof_storage); std::memcpy(short_ptr, stora_ptr, sizeof_storage);
large_ptr += sizeof_storage; large_ptr += sizeof_storage;
short_ptr += sizeof_storage; short_ptr += sizeof_storage;
BOOST_CONTAINER_FALLTHOUGH BOOST_FALLTHROUGH;
case 3: case 3:
std::memcpy(stora_ptr, large_ptr, sizeof_storage); std::memcpy(stora_ptr, large_ptr, sizeof_storage);
std::memcpy(large_ptr, short_ptr, sizeof_storage); std::memcpy(large_ptr, short_ptr, sizeof_storage);
std::memcpy(short_ptr, stora_ptr, sizeof_storage); std::memcpy(short_ptr, stora_ptr, sizeof_storage);
large_ptr += sizeof_storage; large_ptr += sizeof_storage;
short_ptr += sizeof_storage; short_ptr += sizeof_storage;
BOOST_CONTAINER_FALLTHOUGH BOOST_FALLTHROUGH;
case 2: case 2:
std::memcpy(stora_ptr, large_ptr, sizeof_storage); std::memcpy(stora_ptr, large_ptr, sizeof_storage);
std::memcpy(large_ptr, short_ptr, sizeof_storage); std::memcpy(large_ptr, short_ptr, sizeof_storage);
std::memcpy(short_ptr, stora_ptr, sizeof_storage); std::memcpy(short_ptr, stora_ptr, sizeof_storage);
large_ptr += sizeof_storage; large_ptr += sizeof_storage;
short_ptr += sizeof_storage; short_ptr += sizeof_storage;
BOOST_CONTAINER_FALLTHOUGH BOOST_FALLTHROUGH;
case 1: case 1:
std::memcpy(stora_ptr, large_ptr, sizeof_storage); std::memcpy(stora_ptr, large_ptr, sizeof_storage);
std::memcpy(large_ptr, short_ptr, sizeof_storage); std::memcpy(large_ptr, short_ptr, sizeof_storage);

View file

@ -25,7 +25,7 @@
#include <boost/container/detail/workaround.hpp> #include <boost/container/detail/workaround.hpp>
#include <boost/container/allocator_traits.hpp> #include <boost/container/allocator_traits.hpp>
#include <boost/container/detail/to_raw_pointer.hpp> #include <boost/move/detail/to_raw_pointer.hpp>
#include <boost/container/detail/version_type.hpp> #include <boost/container/detail/version_type.hpp>
namespace boost { namespace boost {
@ -152,7 +152,7 @@ struct scoped_destroy_deallocator
~scoped_destroy_deallocator() ~scoped_destroy_deallocator()
{ {
if(m_ptr){ if(m_ptr){
AllocTraits::destroy(m_alloc, container_detail::to_raw_pointer(m_ptr)); AllocTraits::destroy(m_alloc, boost::movelib::to_raw_pointer(m_ptr));
priv_deallocate(m_ptr, alloc_version()); priv_deallocate(m_ptr, alloc_version());
} }
} }
@ -202,7 +202,7 @@ struct scoped_destructor_n
~scoped_destructor_n() ~scoped_destructor_n()
{ {
if(!m_p) return; if(!m_p) return;
value_type *raw_ptr = container_detail::to_raw_pointer(m_p); value_type *raw_ptr = boost::movelib::to_raw_pointer(m_p);
while(m_n--){ while(m_n--){
AllocTraits::destroy(m_a, raw_ptr++); AllocTraits::destroy(m_a, raw_ptr++);
} }
@ -270,12 +270,12 @@ class scoped_destructor
}; };
template<class Allocator> template<class Allocator, class Value = typename Allocator::value_type>
class value_destructor class value_destructor
{ {
typedef boost::container::allocator_traits<Allocator> AllocTraits; typedef boost::container::allocator_traits<Allocator> AllocTraits;
public: public:
typedef typename Allocator::value_type value_type; typedef Value value_type;
value_destructor(Allocator &a, value_type &rv) value_destructor(Allocator &a, value_type &rv)
: rv_(rv), a_(a) : rv_(rv), a_(a)
{} {}
@ -317,7 +317,7 @@ class allocator_destroyer
void operator()(const pointer &p) void operator()(const pointer &p)
{ {
AllocTraits::destroy(a_, container_detail::to_raw_pointer(p)); AllocTraits::destroy(a_, boost::movelib::to_raw_pointer(p));
this->priv_deallocate(p, alloc_version()); this->priv_deallocate(p, alloc_version());
} }
}; };
@ -339,7 +339,7 @@ class allocator_destroyer_and_chain_builder
void operator()(const typename Allocator::pointer &p) void operator()(const typename Allocator::pointer &p)
{ {
allocator_traits<Allocator>::destroy(a_, container_detail::to_raw_pointer(p)); allocator_traits<Allocator>::destroy(a_, boost::movelib::to_raw_pointer(p));
c_.push_back(p); c_.push_back(p);
} }
}; };

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,55 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2017-2017. 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/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_CONTAINER_DETAIL_IS_CONTAINER_HPP
#define BOOST_CONTAINER_DETAIL_IS_CONTAINER_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
//empty
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME empty
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace is_container_detail {
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 0
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
//size
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME size
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace is_container_detail {
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 0
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
namespace boost {
namespace container {
namespace container_detail {
template <class Container>
struct is_container
{
static const bool value =
boost::container::is_container_detail::
has_member_function_callable_with_size <const Container>::value &&
boost::container::is_container_detail::
has_member_function_callable_with_empty<const Container>::value;
};
} //namespace container_detail {
} //namespace container {
} //namespace boost {
#endif //#ifndef BOOST_CONTAINER_DETAIL_IS_CONTAINER_HPP

View file

@ -0,0 +1,47 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2017-2017. 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/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_CONTAINER_DETAIL_IS_CONTIGUOUS_CONTAINER_HPP
#define BOOST_CONTAINER_DETAIL_IS_CONTIGUOUS_CONTAINER_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
//data
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME data
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace is_contiguous_container_detail {
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 0
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
namespace boost {
namespace container {
namespace container_detail {
template <class Container>
struct is_contiguous_container
{
static const bool value =
boost::container::is_contiguous_container_detail::
has_member_function_callable_with_data<Container>::value &&
boost::container::is_contiguous_container_detail::
has_member_function_callable_with_data<const Container>::value;
};
} //namespace container_detail {
} //namespace container {
} //namespace boost {
#endif //#ifndef BOOST_CONTAINER_DETAIL_IS_CONTIGUOUS_CONTAINER_HPP

View file

@ -24,7 +24,7 @@
// container // container
#include <boost/container/container_fwd.hpp> #include <boost/container/container_fwd.hpp>
// container/detail // container/detail
#include <boost/container/detail/to_raw_pointer.hpp> #include <boost/move/detail/to_raw_pointer.hpp>
#include <boost/container/detail/transform_iterator.hpp> #include <boost/container/detail/transform_iterator.hpp>
#include <boost/container/detail/type_traits.hpp> #include <boost/container/detail/type_traits.hpp>
// intrusive // intrusive
@ -63,7 +63,7 @@ class basic_multiallocation_chain
pointer_traits<node_ptr> node_ptr_traits; pointer_traits<node_ptr> node_ptr_traits;
static node & to_node(const VoidPointer &p) static node & to_node(const VoidPointer &p)
{ return *static_cast<node*>(static_cast<void*>(container_detail::to_raw_pointer(p))); } { return *static_cast<node*>(static_cast<void*>(boost::movelib::to_raw_pointer(p))); }
static VoidPointer from_node(node &n) static VoidPointer from_node(node &n)
{ return node_ptr_traits::pointer_to(n); } { return node_ptr_traits::pointer_to(n); }
@ -152,7 +152,7 @@ class basic_multiallocation_chain
char_ptr prev_elem = elem; char_ptr prev_elem = elem;
elem += unit_bytes; elem += unit_bytes;
for(size_type i = 0; i != num_units-1; ++i, elem += unit_bytes){ for(size_type i = 0; i != num_units-1; ++i, elem += unit_bytes){
::new (container_detail::to_raw_pointer(prev_elem)) void_pointer(elem); ::new (boost::movelib::to_raw_pointer(prev_elem)) void_pointer(elem);
prev_elem = elem; prev_elem = elem;
} }
slist_impl_.incorporate_after(after_this, to_node_ptr(b), to_node_ptr(prev_elem), num_units); slist_impl_.incorporate_after(after_this, to_node_ptr(b), to_node_ptr(prev_elem), num_units);

View file

@ -30,10 +30,10 @@
#include <boost/container/detail/allocator_version_traits.hpp> #include <boost/container/detail/allocator_version_traits.hpp>
#include <boost/container/detail/construct_in_place.hpp> #include <boost/container/detail/construct_in_place.hpp>
#include <boost/container/detail/destroyers.hpp> #include <boost/container/detail/destroyers.hpp>
#include <boost/container/detail/iterator_to_raw_pointer.hpp> #include <boost/move/detail/iterator_to_raw_pointer.hpp>
#include <boost/container/detail/mpl.hpp> #include <boost/container/detail/mpl.hpp>
#include <boost/container/detail/placement_new.hpp> #include <boost/container/detail/placement_new.hpp>
#include <boost/container/detail/to_raw_pointer.hpp> #include <boost/move/detail/to_raw_pointer.hpp>
#include <boost/container/detail/type_traits.hpp> #include <boost/container/detail/type_traits.hpp>
#include <boost/container/detail/version_type.hpp> #include <boost/container/detail/version_type.hpp>
// intrusive // intrusive
@ -106,23 +106,23 @@ struct node_alloc_holder
: members_(a) : members_(a)
{} {}
//Constructors for associative containers
node_alloc_holder(const value_compare &c, const ValAlloc &a)
: members_(a, c)
{}
explicit node_alloc_holder(const node_alloc_holder &x) explicit node_alloc_holder(const node_alloc_holder &x)
: members_(NodeAllocTraits::select_on_container_copy_construction(x.node_alloc())) : members_(NodeAllocTraits::select_on_container_copy_construction(x.node_alloc()))
{} {}
node_alloc_holder(const node_alloc_holder &x, const value_compare &c)
: members_(NodeAllocTraits::select_on_container_copy_construction(x.node_alloc()), c)
{}
explicit node_alloc_holder(BOOST_RV_REF(node_alloc_holder) x) explicit node_alloc_holder(BOOST_RV_REF(node_alloc_holder) x)
: members_(boost::move(x.node_alloc())) : members_(boost::move(x.node_alloc()))
{ this->icont().swap(x.icont()); } { this->icont().swap(x.icont()); }
//Constructors for associative containers
explicit node_alloc_holder(const value_compare &c, const ValAlloc &a)
: members_(a, c)
{}
explicit node_alloc_holder(const value_compare &c, const node_alloc_holder &x)
: members_(NodeAllocTraits::select_on_container_copy_construction(x.node_alloc()), c)
{}
explicit node_alloc_holder(const value_compare &c) explicit node_alloc_holder(const value_compare &c)
: members_(c) : members_(c)
{} {}
@ -171,7 +171,7 @@ struct node_alloc_holder
node_deallocator.release(); node_deallocator.release();
//This does not throw //This does not throw
typedef typename Node::hook_type hook_type; typedef typename Node::hook_type hook_type;
::new(static_cast<hook_type*>(container_detail::to_raw_pointer(p)), boost_container_new_t()) hook_type; ::new(static_cast<hook_type*>(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) hook_type;
return (p); return (p);
} }
@ -189,7 +189,7 @@ struct node_alloc_holder
BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
node_deallocator.release();\ node_deallocator.release();\
typedef typename Node::hook_type hook_type;\ typedef typename Node::hook_type hook_type;\
::new(static_cast<hook_type*>(container_detail::to_raw_pointer(p)), boost_container_new_t()) hook_type;\ ::new(static_cast<hook_type*>(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) hook_type;\
return (p);\ return (p);\
}\ }\
// //
@ -207,7 +207,7 @@ struct node_alloc_holder
node_deallocator.release(); node_deallocator.release();
//This does not throw //This does not throw
typedef typename Node::hook_type hook_type; typedef typename Node::hook_type hook_type;
::new(static_cast<hook_type*>(container_detail::to_raw_pointer(p)), boost_container_new_t()) hook_type; ::new(static_cast<hook_type*>(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) hook_type;
return (p); return (p);
} }
@ -230,13 +230,13 @@ struct node_alloc_holder
node_deallocator.release(); node_deallocator.release();
//This does not throw //This does not throw
typedef typename Node::hook_type hook_type; typedef typename Node::hook_type hook_type;
::new(static_cast<hook_type*>(container_detail::to_raw_pointer(p)), boost_container_new_t()) hook_type; ::new(static_cast<hook_type*>(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) hook_type;
return (p); return (p);
} }
void destroy_node(const NodePtr &nodep) void destroy_node(const NodePtr &nodep)
{ {
allocator_traits<NodeAlloc>::destroy(this->node_alloc(), container_detail::to_raw_pointer(nodep)); allocator_traits<NodeAlloc>::destroy(this->node_alloc(), boost::movelib::to_raw_pointer(nodep));
this->deallocate_one(nodep); this->deallocate_one(nodep);
} }
@ -266,7 +266,7 @@ struct node_alloc_holder
Deallocator node_deallocator(NodePtr(), nalloc); Deallocator node_deallocator(NodePtr(), nalloc);
container_detail::scoped_destructor<NodeAlloc> sdestructor(nalloc, 0); container_detail::scoped_destructor<NodeAlloc> sdestructor(nalloc, 0);
while(n--){ while(n--){
p = container_detail::iterator_to_raw_pointer(itbeg); p = boost::movelib::iterator_to_raw_pointer(itbeg);
node_deallocator.set(p); node_deallocator.set(p);
++itbeg; ++itbeg;
//This can throw //This can throw

View file

@ -35,16 +35,62 @@
#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair #include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
#include <boost/move/utility_core.hpp> #include <boost/move/utility_core.hpp>
#include<boost/move/detail/fwd_macros.hpp> #include <boost/move/detail/fwd_macros.hpp>
namespace boost { namespace boost {
namespace tuples { namespace tuples {
struct null_type; struct null_type;
template <
class T0, class T1, class T2,
class T3, class T4, class T5,
class T6, class T7, class T8,
class T9>
class tuple;
} //namespace tuples { } //namespace tuples {
} //namespace boost { } //namespace boost {
namespace boost {
namespace container {
namespace pair_impl {
template <class TupleClass>
struct is_boost_tuple
{
static const bool value = false;
};
template <
class T0, class T1, class T2,
class T3, class T4, class T5,
class T6, class T7, class T8,
class T9>
struct is_boost_tuple< boost::tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
{
static const bool value = true;
};
template<class Tuple>
struct disable_if_boost_tuple
: boost::container::container_detail::disable_if< is_boost_tuple<Tuple> >
{};
template<class T>
struct is_tuple_null
{
static const bool value = false;
};
template<>
struct is_tuple_null<boost::tuples::null_type>
{
static const bool value = true;
};
}}}
#if defined(BOOST_MSVC) && (_CPPLIB_VER == 520) #if defined(BOOST_MSVC) && (_CPPLIB_VER == 520)
//MSVC 2010 tuple marker //MSVC 2010 tuple marker
namespace std { namespace tr1 { struct _Nil; }} namespace std { namespace tr1 { struct _Nil; }}
@ -236,7 +282,12 @@ struct pair
BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
pair( piecewise_construct_t\ pair( piecewise_construct_t\
, BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> p\ , BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> p\
, BoostTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::boost::tuples::null_type)> q)\ , BoostTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::boost::tuples::null_type)> q\
, typename container_detail::enable_if_c\
< pair_impl::is_boost_tuple< BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> >::value &&\
!(pair_impl::is_tuple_null<BOOST_MOVE_LAST_TARG##N>::value || pair_impl::is_tuple_null<BOOST_MOVE_LAST_TARGQ##M>::value) \
>::type* = 0\
)\
: first(BOOST_MOVE_TMPL_GET##N), second(BOOST_MOVE_TMPL_GETQ##M)\ : first(BOOST_MOVE_TMPL_GET##N), second(BOOST_MOVE_TMPL_GETQ##M)\
{ (void)p; (void)q; }\ { (void)p; (void)q; }\
// //
@ -254,7 +305,8 @@ struct pair
{ (void) t1; (void)t2; } { (void) t1; (void)t2; }
public: public:
template<template<class ...> class Tuple, class... Args1, class... Args2> template< template<class ...> class Tuple, class... Args1, class... Args2
, class = typename pair_impl::disable_if_boost_tuple< Tuple<Args1...> >::type>
pair(piecewise_construct_t, Tuple<Args1...> t1, Tuple<Args2...> t2) pair(piecewise_construct_t, Tuple<Args1...> t1, Tuple<Args2...> t2)
: pair(t1, t2, typename build_number_seq<sizeof...(Args1)>::type(), typename build_number_seq<sizeof...(Args2)>::type()) : pair(t1, t2, typename build_number_seq<sizeof...(Args1)>::type(), typename build_number_seq<sizeof...(Args2)>::type())
{} {}
@ -270,7 +322,8 @@ struct pair
{ (void)t; return T(::boost::forward<Args>(get<Indexes>(t))...); } { (void)t; return T(::boost::forward<Args>(get<Indexes>(t))...); }
public: public:
template<template<class ...> class Tuple, class... Args1, class... Args2> template< template<class ...> class Tuple, class... Args1, class... Args2
, class = typename pair_impl::disable_if_boost_tuple< Tuple<Args1...> >::type>
pair(piecewise_construct_t, Tuple<Args1...> t1, Tuple<Args2...> t2) pair(piecewise_construct_t, Tuple<Args1...> t1, Tuple<Args2...> t2)
: first (build_from_args<first_type> (::boost::move(t1))) : first (build_from_args<first_type> (::boost::move(t1)))
, second (build_from_args<second_type>(::boost::move(t2))) , second (build_from_args<second_type>(::boost::move(t2)))

View file

@ -0,0 +1,55 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2005-2013. 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/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_CONTAINER_PAIR_KEY_MAPPED_OF_VALUE_HPP
#define BOOST_CONTAINER_PAIR_KEY_MAPPED_OF_VALUE_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#include <boost/container/detail/config_begin.hpp>
#include <boost/container/detail/workaround.hpp>
namespace boost {
namespace container {
template<class Key, class Mapped>
struct pair_key_mapped_of_value
{
typedef Key key_type;
typedef Mapped mapped_type;
template<class Pair>
const key_type & key_of_value(const Pair &p) const
{ return p.first; }
template<class Pair>
const mapped_type & mapped_of_value(const Pair &p) const
{ return p.second; }
template<class Pair>
key_type & key_of_value(Pair &p) const
{ return const_cast<key_type&>(p.first); }
template<class Pair>
mapped_type & mapped_of_value(Pair &p) const
{ return p.second; }
};
}}
#include <boost/container/detail/config_end.hpp>
#endif // BOOST_CONTAINER_PAIR_KEY_MAPPED_OF_VALUE_HPP

View file

@ -493,7 +493,7 @@ class tree
typedef boost::container::reverse_iterator typedef boost::container::reverse_iterator
<const_iterator> const_reverse_iterator; <const_iterator> const_reverse_iterator;
typedef node_handle typedef node_handle
< Node, value_type, allocator_type, void> node_type; < NodeAlloc, void> node_type;
typedef insert_return_type_base typedef insert_return_type_base
<iterator, node_type> insert_return_type; <iterator, node_type> insert_return_type;
@ -509,7 +509,11 @@ class tree
: AllocHolder() : AllocHolder()
{} {}
BOOST_CONTAINER_FORCEINLINE explicit tree(const key_compare& comp, const allocator_type& a = allocator_type()) BOOST_CONTAINER_FORCEINLINE explicit tree(const key_compare& comp)
: AllocHolder(ValComp(comp))
{}
BOOST_CONTAINER_FORCEINLINE explicit tree(const key_compare& comp, const allocator_type& a)
: AllocHolder(ValComp(comp), a) : AllocHolder(ValComp(comp), a)
{} {}
@ -518,85 +522,110 @@ class tree
{} {}
template <class InputIterator> template <class InputIterator>
tree(bool unique_insertion, InputIterator first, InputIterator last, const key_compare& comp, tree(bool unique_insertion, InputIterator first, InputIterator last)
const allocator_type& a : AllocHolder(value_compare(key_compare()))
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) {
, typename container_detail::enable_if_or this->tree_construct(unique_insertion, first, last);
< void //AllocHolder clears in case of exception
, container_detail::is_same<alloc_version, version_1> }
, container_detail::is_input_iterator<InputIterator>
>::type * = 0 template <class InputIterator>
#endif tree(bool unique_insertion, InputIterator first, InputIterator last, const key_compare& comp)
) : AllocHolder(value_compare(comp))
{
this->tree_construct(unique_insertion, first, last);
//AllocHolder clears in case of exception
}
template <class InputIterator>
tree(bool unique_insertion, InputIterator first, InputIterator last, const key_compare& comp, const allocator_type& a)
: AllocHolder(value_compare(comp), a) : AllocHolder(value_compare(comp), a)
{
this->tree_construct(unique_insertion, first, last);
//AllocHolder clears in case of exception
}
//construct with ordered range
template <class InputIterator>
tree( ordered_range_t, InputIterator first, InputIterator last)
: AllocHolder(value_compare(key_compare()))
{
this->tree_construct(ordered_range_t(), first, last);
}
template <class InputIterator>
tree( ordered_range_t, InputIterator first, InputIterator last, const key_compare& comp)
: AllocHolder(value_compare(comp))
{
this->tree_construct(ordered_range_t(), first, last);
}
template <class InputIterator>
tree( ordered_range_t, InputIterator first, InputIterator last
, const key_compare& comp, const allocator_type& a)
: AllocHolder(value_compare(comp), a)
{
this->tree_construct(ordered_range_t(), first, last);
}
private:
template <class InputIterator>
void tree_construct(bool unique_insertion, InputIterator first, InputIterator last)
{ {
//Use cend() as hint to achieve linear time for //Use cend() as hint to achieve linear time for
//ordered ranges as required by the standard //ordered ranges as required by the standard
//for the constructor //for the constructor
const const_iterator end_it(this->cend());
if(unique_insertion){ if(unique_insertion){
for ( ; first != last; ++first){
this->insert_unique_convertible(end_it, *first);
}
}
else{
for ( ; first != last; ++first){
this->insert_equal_convertible(end_it, *first);
}
}
}
template <class InputIterator>
tree(bool unique_insertion, InputIterator first, InputIterator last, const key_compare& comp,
const allocator_type& a
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
, typename container_detail::disable_if_or
< void
, container_detail::is_same<alloc_version, version_1>
, container_detail::is_input_iterator<InputIterator>
>::type * = 0
#endif
)
: AllocHolder(value_compare(comp), a)
{
if(unique_insertion){
//Use cend() as hint to achieve linear time for
//ordered ranges as required by the standard
//for the constructor
const const_iterator end_it(this->cend()); const const_iterator end_it(this->cend());
for ( ; first != last; ++first){ for ( ; first != last; ++first){
this->insert_unique_convertible(end_it, *first); this->insert_unique_convertible(end_it, *first);
} }
} }
else{ else{
//Optimized allocation and construction this->tree_construct_non_unique(first, last);
this->allocate_many_and_construct
( first, boost::container::iterator_distance(first, last)
, insert_equal_end_hint_functor<Node, Icont>(this->icont()));
} }
} }
template <class InputIterator> template <class InputIterator>
tree( ordered_range_t, InputIterator first, InputIterator last void tree_construct_non_unique(InputIterator first, InputIterator last
, const key_compare& comp = key_compare(), const allocator_type& a = allocator_type() #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
, typename container_detail::enable_if_or , typename container_detail::enable_if_or
< void < void
, container_detail::is_same<alloc_version, version_1> , container_detail::is_same<alloc_version, version_1>
, container_detail::is_input_iterator<InputIterator> , container_detail::is_input_iterator<InputIterator>
>::type * = 0 >::type * = 0
#endif #endif
) )
: AllocHolder(value_compare(comp), a)
{ {
//Use cend() as hint to achieve linear time for
//ordered ranges as required by the standard
//for the constructor
const const_iterator end_it(this->cend());
for ( ; first != last; ++first){ for ( ; first != last; ++first){
this->push_back_impl(*first); this->insert_equal_convertible(end_it, *first);
} }
} }
template <class InputIterator> template <class InputIterator>
tree( ordered_range_t, InputIterator first, InputIterator last void tree_construct_non_unique(InputIterator first, InputIterator last
, const key_compare& comp = key_compare(), const allocator_type& a = allocator_type() #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
, typename container_detail::disable_if_or
< void
, container_detail::is_same<alloc_version, version_1>
, container_detail::is_input_iterator<InputIterator>
>::type * = 0
#endif
)
{
//Optimized allocation and construction
this->allocate_many_and_construct
( first, boost::container::iterator_distance(first, last)
, insert_equal_end_hint_functor<Node, Icont>(this->icont()));
}
template <class InputIterator>
void tree_construct( ordered_range_t, InputIterator first, InputIterator last
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
, typename container_detail::disable_if_or , typename container_detail::disable_if_or
< void < void
@ -605,16 +634,34 @@ class tree
>::type * = 0 >::type * = 0
#endif #endif
) )
: AllocHolder(value_compare(comp), a)
{ {
//Optimized allocation and construction //Optimized allocation and construction
this->allocate_many_and_construct this->allocate_many_and_construct
( first, boost::container::iterator_distance(first, last) ( first, boost::container::iterator_distance(first, last)
, container_detail::push_back_functor<Node, Icont>(this->icont())); , container_detail::push_back_functor<Node, Icont>(this->icont()));
//AllocHolder clears in case of exception
} }
template <class InputIterator>
void tree_construct( ordered_range_t, InputIterator first, InputIterator last
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
, typename container_detail::enable_if_or
< void
, container_detail::is_same<alloc_version, version_1>
, container_detail::is_input_iterator<InputIterator>
>::type * = 0
#endif
)
{
for ( ; first != last; ++first){
this->push_back_impl(*first);
}
}
public:
BOOST_CONTAINER_FORCEINLINE tree(const tree& x) BOOST_CONTAINER_FORCEINLINE tree(const tree& x)
: AllocHolder(x.value_comp(), x) : AllocHolder(x, x.value_comp())
{ {
this->icont().clone_from this->icont().clone_from
(x.icont(), typename AllocHolder::cloner(*this), Destroyer(this->node_alloc())); (x.icont(), typename AllocHolder::cloner(*this), Destroyer(this->node_alloc()));
@ -630,6 +677,7 @@ class tree
{ {
this->icont().clone_from this->icont().clone_from
(x.icont(), typename AllocHolder::cloner(*this), Destroyer(this->node_alloc())); (x.icont(), typename AllocHolder::cloner(*this), Destroyer(this->node_alloc()));
//AllocHolder clears in case of exception
} }
tree(BOOST_RV_REF(tree) x, const allocator_type &a) tree(BOOST_RV_REF(tree) x, const allocator_type &a)
@ -642,6 +690,7 @@ class tree
this->icont().clone_from this->icont().clone_from
(boost::move(x.icont()), typename AllocHolder::move_cloner(*this), Destroyer(this->node_alloc())); (boost::move(x.icont()), typename AllocHolder::move_cloner(*this), Destroyer(this->node_alloc()));
} }
//AllocHolder clears in case of exception
} }
BOOST_CONTAINER_FORCEINLINE ~tree() BOOST_CONTAINER_FORCEINLINE ~tree()
@ -1142,7 +1191,7 @@ class tree
this->insert_unique_check(hint, KeyOfValue()(nh.value()), data); this->insert_unique_check(hint, KeyOfValue()(nh.value()), data);
if(ret.second){ if(ret.second){
irt.inserted = true; irt.inserted = true;
irt.position = iterator(this->icont().insert_unique_commit(*nh.get_node_pointer(), data)); irt.position = iterator(this->icont().insert_unique_commit(*nh.get(), data));
nh.release(); nh.release();
} }
else{ else{

View file

@ -43,12 +43,6 @@
# endif # endif
#endif #endif
#if !defined(BOOST_FALLTHOUGH)
#define BOOST_CONTAINER_FALLTHOUGH
#else
#define BOOST_CONTAINER_FALLTHOUGH BOOST_FALLTHOUGH;
#endif
#if defined(BOOST_MSVC) && (_MSC_VER < 1400) #if defined(BOOST_MSVC) && (_MSC_VER < 1400)
#define BOOST_CONTAINER_TEMPLATED_CONVERSION_OPERATOR_BROKEN #define BOOST_CONTAINER_TEMPLATED_CONVERSION_OPERATOR_BROKEN
#endif #endif

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -31,6 +31,8 @@
#include <boost/container/detail/type_traits.hpp> #include <boost/container/detail/type_traits.hpp>
#include <boost/container/detail/value_init.hpp> #include <boost/container/detail/value_init.hpp>
#include <boost/container/detail/pair.hpp> #include <boost/container/detail/pair.hpp>
#include <boost/container/detail/pair_key_mapped_of_value.hpp>
// move // move
#include <boost/move/traits.hpp> #include <boost/move/traits.hpp>
#include <boost/move/utility_core.hpp> #include <boost/move/utility_core.hpp>
@ -53,34 +55,6 @@
namespace boost { namespace boost {
namespace container { namespace container {
///@cond
template<class Key, class Mapped>
struct pair_key_mapped_of_value
{
typedef Key key_type;
typedef Mapped mapped_type;
template<class Pair>
const key_type & key_of_value(const Pair &p) const
{ return p.first; }
template<class Pair>
const mapped_type & mapped_of_value(const Pair &p) const
{ return p.second; }
template<class Pair>
key_type & key_of_value(Pair &p) const
{ return const_cast<key_type&>(p.first); }
template<class Pair>
mapped_type & mapped_of_value(Pair &p) const
{ return p.second; }
};
///@endcond
#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
//! A map is a kind of associative container that supports unique keys (contains at //! A map is a kind of associative container that supports unique keys (contains at
@ -132,7 +106,7 @@ class map
typedef Key key_type; typedef Key key_type;
typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type; typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
typedef T mapped_type; typedef T mapped_type;
typedef std::pair<const Key, T> value_type; typedef typename boost::container::allocator_traits<Allocator>::value_type value_type;
typedef typename boost::container::allocator_traits<Allocator>::pointer pointer; typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
typedef typename boost::container::allocator_traits<Allocator>::const_pointer const_pointer; typedef typename boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
typedef typename boost::container::allocator_traits<Allocator>::reference reference; typedef typename boost::container::allocator_traits<Allocator>::reference reference;
@ -150,14 +124,15 @@ class map
typedef std::pair<key_type, mapped_type> nonconst_value_type; typedef std::pair<key_type, mapped_type> nonconst_value_type;
typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type; typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type;
typedef BOOST_CONTAINER_IMPDEF(node_handle< typedef BOOST_CONTAINER_IMPDEF(node_handle<
typename base_t::node_type::container_node_type typename base_t::stored_allocator_type
BOOST_MOVE_I value_type
BOOST_MOVE_I allocator_type
BOOST_MOVE_I pair_key_mapped_of_value BOOST_MOVE_I pair_key_mapped_of_value
<key_type BOOST_MOVE_I mapped_type> >) node_type; <key_type BOOST_MOVE_I mapped_type> >) node_type;
typedef BOOST_CONTAINER_IMPDEF typedef BOOST_CONTAINER_IMPDEF
(insert_return_type_base<iterator BOOST_MOVE_I node_type>) insert_return_type; (insert_return_type_base<iterator BOOST_MOVE_I node_type>) insert_return_type;
//allocator_type::value_type type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<typename allocator_type::value_type, std::pair<const Key, T> >::value));
////////////////////////////////////////////// //////////////////////////////////////////////
// //
// construct/copy/destroy // construct/copy/destroy
@ -171,62 +146,99 @@ class map
map() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value && map() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
container_detail::is_nothrow_default_constructible<Compare>::value) container_detail::is_nothrow_default_constructible<Compare>::value)
: base_t() : base_t()
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Constructs an empty map using the specified comparison object //! <b>Effects</b>: Constructs an empty map using the specified comparison object
//! and allocator. //! and allocator.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE map(const Compare& comp, const allocator_type& a)
explicit map(const Compare& comp, const allocator_type& a = allocator_type())
: base_t(comp, a) : base_t(comp, a)
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value)); //! <b>Effects</b>: Constructs an empty map using the specified comparison object.
} //!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_FORCEINLINE explicit map(const Compare& comp)
: base_t(comp)
{}
//! <b>Effects</b>: Constructs an empty map using the specified allocator. //! <b>Effects</b>: Constructs an empty map using the specified allocator.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE explicit map(const allocator_type& a)
explicit map(const allocator_type& a)
: base_t(a) : base_t(a)
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Constructs an empty map using the specified comparison object and //! <b>Effects</b>: Constructs an empty map and
//! allocator, and inserts elements from the range [first ,last ). //! inserts elements from the range [first ,last ).
//! //!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is last - first. //! the predicate and otherwise N logN, where N is last - first.
template <class InputIterator> template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last)
map(InputIterator first, InputIterator last, const Compare& comp = Compare(), : base_t(true, first, last)
const allocator_type& a = allocator_type()) {}
: base_t(true, first, last, comp, a)
{
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Constructs an empty map using the specified //! <b>Effects</b>: Constructs an empty map using the specified
//! allocator, and inserts elements from the range [first ,last ). //! allocator, and inserts elements from the range [first ,last ).
//! //!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is last - first. //! the predicate and otherwise N logN, where N is last - first.
template <class InputIterator> template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const allocator_type& a)
map(InputIterator first, InputIterator last, const allocator_type& a)
: base_t(true, first, last, Compare(), a) : base_t(true, first, last, Compare(), a)
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value)); //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
} //! inserts elements from the range [first ,last ).
//!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! the predicate and otherwise N logN, where N is last - first.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const Compare& comp)
: base_t(true, first, last, comp)
{}
//! <b>Effects</b>: Constructs an empty map using the specified comparison object and
//! allocator, and inserts elements from the range [first ,last ).
//!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! the predicate and otherwise N logN, where N is last - first.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
: base_t(true, first, last, comp, a)
{}
//! <b>Effects</b>: Constructs an empty map and
//! inserts elements from the ordered unique range [first ,last). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
//! unique values.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last)
: base_t(ordered_range, first, last)
{}
//! <b>Effects</b>: Constructs an empty map using the specified comparison object and
//! inserts elements from the ordered unique range [first ,last). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
//! unique values.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp)
: base_t(ordered_range, first, last, comp)
{}
//! <b>Effects</b>: Constructs an empty map using the specified comparison object and //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
//! allocator, and inserts elements from the ordered unique range [first ,last). This function //! allocator, and inserts elements from the ordered unique range [first ,last). This function
@ -239,43 +251,76 @@ class map
//! //!
//! <b>Note</b>: Non-standard extension. //! <b>Note</b>: Non-standard extension.
template <class InputIterator> template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last
map( ordered_unique_range_t, InputIterator first, InputIterator last , const Compare& comp, const allocator_type& a)
, const Compare& comp = Compare(), const allocator_type& a = allocator_type())
: base_t(ordered_range, first, last, comp, a) : base_t(ordered_range, first, last, comp, a)
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
//! <b>Effects</b>: Constructs an empty map and
//! inserts elements from the range [il.begin(), il.end()).
//!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted according
//! to the predicate and otherwise N logN, where N is il.first() - il.end().
BOOST_CONTAINER_FORCEINLINE map(std::initializer_list<value_type> il)
: base_t(true, il.begin(), il.end())
{}
//! <b>Effects</b>: Constructs an empty map using the specified comparison object and //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
//! allocator, and inserts elements from the range [il.begin(), il.end()). //! inserts elements from the range [il.begin(), il.end()).
//! //!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is il.first() - il.end(). //! the predicate and otherwise N logN, where N is il.first() - il.end().
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE map(std::initializer_list<value_type> il, const Compare& comp)
map(std::initializer_list<value_type> il, const Compare& comp = Compare(), const allocator_type& a = allocator_type()) : base_t(true, il.begin(), il.end(), comp)
: base_t(true, il.begin(), il.end(), comp, a) {}
{
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Constructs an empty map using the specified //! <b>Effects</b>: Constructs an empty map using the specified
//! allocator, and inserts elements from the range [il.begin(), il.end()). //! allocator, and inserts elements from the range [il.begin(), il.end()).
//! //!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is il.first() - il.end(). //! the predicate and otherwise N logN, where N is il.first() - il.end().
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE map(std::initializer_list<value_type> il, const allocator_type& a)
map(std::initializer_list<value_type> il, const allocator_type& a)
: base_t(true, il.begin(), il.end(), Compare(), a) : base_t(true, il.begin(), il.end(), Compare(), a)
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Constructs an empty set using the specified comparison object and //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
//! allocator, and inserts elements from the range [il.begin(), il.end()).
//!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! the predicate and otherwise N logN, where N is il.first() - il.end().
BOOST_CONTAINER_FORCEINLINE map(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
: base_t(true, il.begin(), il.end(), comp, a)
{}
//! <b>Effects</b>: Constructs an empty map and inserts elements from the ordered unique range [il.begin(), il.end()).
//! This function is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
//! unique values.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
BOOST_CONTAINER_FORCEINLINE map(ordered_unique_range_t, std::initializer_list<value_type> il)
: base_t(ordered_range, il.begin(), il.end())
{}
//! <b>Effects</b>: Constructs an empty map using the specified comparison object,
//! and inserts elements from the ordered unique range [il.begin(), il.end()). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
//! unique values.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
BOOST_CONTAINER_FORCEINLINE map(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp)
: base_t(ordered_range, il.begin(), il.end(), comp)
{}
//! <b>Effects</b>: Constructs an empty map using the specified comparison object and
//! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
//! is more efficient than the normal range creation for ordered ranges. //! is more efficient than the normal range creation for ordered ranges.
//! //!
@ -285,51 +330,36 @@ class map
//! <b>Complexity</b>: Linear in N. //! <b>Complexity</b>: Linear in N.
//! //!
//! <b>Note</b>: Non-standard extension. //! <b>Note</b>: Non-standard extension.
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, std::initializer_list<value_type> il
map(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp = Compare(), , const Compare& comp, const allocator_type& a)
const allocator_type& a = allocator_type())
: base_t(ordered_range, il.begin(), il.end(), comp, a) : base_t(ordered_range, il.begin(), il.end(), comp, a)
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
#endif #endif
//! <b>Effects</b>: Copy constructs a map. //! <b>Effects</b>: Copy constructs a map.
//! //!
//! <b>Complexity</b>: Linear in x.size(). //! <b>Complexity</b>: Linear in x.size().
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE map(const map& x)
map(const map& x)
: base_t(static_cast<const base_t&>(x)) : base_t(static_cast<const base_t&>(x))
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Move constructs a map. Constructs *this using x's resources. //! <b>Effects</b>: Move constructs a map. Constructs *this using x's resources.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
//! //!
//! <b>Postcondition</b>: x is emptied. //! <b>Postcondition</b>: x is emptied.
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE map(BOOST_RV_REF(map) x)
map(BOOST_RV_REF(map) x)
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value) BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
: base_t(BOOST_MOVE_BASE(base_t, x)) : base_t(BOOST_MOVE_BASE(base_t, x))
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Copy constructs a map using the specified allocator. //! <b>Effects</b>: Copy constructs a map using the specified allocator.
//! //!
//! <b>Complexity</b>: Linear in x.size(). //! <b>Complexity</b>: Linear in x.size().
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE map(const map& x, const allocator_type &a)
map(const map& x, const allocator_type &a)
: base_t(static_cast<const base_t&>(x), a) : base_t(static_cast<const base_t&>(x), a)
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Move constructs a map using the specified allocator. //! <b>Effects</b>: Move constructs a map using the specified allocator.
//! Constructs *this using x's resources. //! Constructs *this using x's resources.
@ -337,19 +367,14 @@ class map
//! <b>Complexity</b>: Constant if x == x.get_allocator(), linear otherwise. //! <b>Complexity</b>: Constant if x == x.get_allocator(), linear otherwise.
//! //!
//! <b>Postcondition</b>: x is emptied. //! <b>Postcondition</b>: x is emptied.
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE map(BOOST_RV_REF(map) x, const allocator_type &a)
map(BOOST_RV_REF(map) x, const allocator_type &a)
: base_t(BOOST_MOVE_BASE(base_t, x), a) : base_t(BOOST_MOVE_BASE(base_t, x), a)
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Makes *this a copy of x. //! <b>Effects</b>: Makes *this a copy of x.
//! //!
//! <b>Complexity</b>: Linear in x.size(). //! <b>Complexity</b>: Linear in x.size().
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE map& operator=(BOOST_COPY_ASSIGN_REF(map) x)
map& operator=(BOOST_COPY_ASSIGN_REF(map) x)
{ return static_cast<map&>(this->base_t::operator=(static_cast<const base_t&>(x))); } { return static_cast<map&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
//! <b>Effects</b>: this->swap(x.get()). //! <b>Effects</b>: this->swap(x.get()).
@ -360,8 +385,7 @@ class map
//! <b>Complexity</b>: Constant if allocator_traits_type:: //! <b>Complexity</b>: Constant if allocator_traits_type::
//! propagate_on_container_move_assignment is true or //! propagate_on_container_move_assignment is true or
//! this->get>allocator() == x.get_allocator(). Linear otherwise. //! this->get>allocator() == x.get_allocator(). Linear otherwise.
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE map& operator=(BOOST_RV_REF(map) x)
map& operator=(BOOST_RV_REF(map) x)
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
allocator_traits_type::is_always_equal::value) && allocator_traits_type::is_always_equal::value) &&
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value) boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
@ -370,8 +394,7 @@ class map
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
//! <b>Effects</b>: Assign content of il to *this. //! <b>Effects</b>: Assign content of il to *this.
//! //!
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE map& operator=(std::initializer_list<value_type> il)
map& operator=(std::initializer_list<value_type> il)
{ {
this->clear(); this->clear();
insert(il.begin(), il.end()); insert(il.begin(), il.end());
@ -716,7 +739,7 @@ class map
//! //!
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
//! is inserted right before p. //! is inserted right before p.
iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x) BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
{ return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); } { return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); }
//! <b>Effects</b>: Move constructs a new value from x if and only if there is //! <b>Effects</b>: Move constructs a new value from x if and only if there is
@ -728,7 +751,7 @@ class map
//! //!
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
//! is inserted right before p. //! is inserted right before p.
iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x) BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
{ return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); } { return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); }
//! <b>Effects</b>: Inserts a copy of x in the container. //! <b>Effects</b>: Inserts a copy of x in the container.
@ -746,7 +769,7 @@ class map
//! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x. //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
//! //!
//! <b>Complexity</b>: Logarithmic. //! <b>Complexity</b>: Logarithmic.
iterator insert(const_iterator p, BOOST_RV_REF(value_type) x) BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(value_type) x)
{ return this->base_t::insert_unique(p, boost::move(x)); } { return this->base_t::insert_unique(p, boost::move(x)); }
//! <b>Requires</b>: first, last are not iterators into *this. //! <b>Requires</b>: first, last are not iterators into *this.
@ -1225,7 +1248,7 @@ class multimap
typedef Key key_type; typedef Key key_type;
typedef T mapped_type; typedef T mapped_type;
typedef std::pair<const Key, T> value_type; typedef typename boost::container::allocator_traits<Allocator>::value_type value_type;
typedef typename boost::container::allocator_traits<Allocator>::pointer pointer; typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
typedef typename boost::container::allocator_traits<Allocator>::const_pointer const_pointer; typedef typename boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
typedef typename boost::container::allocator_traits<Allocator>::reference reference; typedef typename boost::container::allocator_traits<Allocator>::reference reference;
@ -1243,12 +1266,13 @@ class multimap
typedef std::pair<key_type, mapped_type> nonconst_value_type; typedef std::pair<key_type, mapped_type> nonconst_value_type;
typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type; typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type;
typedef BOOST_CONTAINER_IMPDEF(node_handle< typedef BOOST_CONTAINER_IMPDEF(node_handle<
typename base_t::node_type::container_node_type typename base_t::stored_allocator_type
BOOST_MOVE_I value_type
BOOST_MOVE_I allocator_type
BOOST_MOVE_I pair_key_mapped_of_value BOOST_MOVE_I pair_key_mapped_of_value
<key_type BOOST_MOVE_I mapped_type> >) node_type; <key_type BOOST_MOVE_I mapped_type> >) node_type;
//allocator_type::value_type type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<typename allocator_type::value_type, std::pair<const Key, T> >::value));
////////////////////////////////////////////// //////////////////////////////////////////////
// //
// construct/copy/destroy // construct/copy/destroy
@ -1258,66 +1282,102 @@ class multimap
//! <b>Effects</b>: Default constructs an empty multimap. //! <b>Effects</b>: Default constructs an empty multimap.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE multimap()
multimap() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value && BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
container_detail::is_nothrow_default_constructible<Compare>::value) container_detail::is_nothrow_default_constructible<Compare>::value)
: base_t() : base_t()
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Constructs an empty multimap using the specified allocator. //! <b>Effects</b>: Constructs an empty multimap using the specified allocator
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_FORCEINLINE
explicit multimap(const Compare& comp, const allocator_type& a = allocator_type())
: base_t(comp, a)
{
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Constructs an empty multimap using the specified comparison
//! object and allocator. //! object and allocator.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE explicit multimap(const allocator_type& a)
explicit multimap(const allocator_type& a)
: base_t(a) : base_t(a)
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Constructs an empty multimap using the specified comparison object //! <b>Effects</b>: Constructs an empty multimap using the specified comparison.
//! and allocator, and inserts elements from the range [first ,last ). //!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_FORCEINLINE explicit multimap(const Compare& comp)
: base_t(comp)
{}
//! <b>Effects</b>: Constructs an empty multimap using the specified comparison and allocator.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_FORCEINLINE multimap(const Compare& comp, const allocator_type& a)
: base_t(comp, a)
{}
//! <b>Effects</b>: Constructs an empty multimap and
//! inserts elements from the range [first ,last ).
//! //!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is last - first. //! the predicate and otherwise N logN, where N is last - first.
template <class InputIterator> template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last)
multimap(InputIterator first, InputIterator last, : base_t(false, first, last)
const Compare& comp = Compare(), {}
const allocator_type& a = allocator_type())
: base_t(false, first, last, comp, a)
{
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Constructs an empty multimap using the specified //! <b>Effects</b>: Constructs an empty multimap using the specified
//! allocator, and inserts elements from the range [first ,last ). //! allocator, and inserts elements from the range [first ,last ).
//! //!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is last - first. //! the predicate and otherwise N logN, where N is last - first.
template <class InputIterator> template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, const allocator_type& a) BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, const allocator_type& a)
: base_t(false, first, last, Compare(), a) : base_t(false, first, last, Compare(), a)
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value)); //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
} //! inserts elements from the range [first ,last ).
//!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! the predicate and otherwise N logN, where N is last - first.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, const Compare& comp)
: base_t(false, first, last, comp)
{}
//! <b>Effects</b>: Constructs an empty multimap using the specified comparison object
//! and allocator, and inserts elements from the range [first ,last ).
//!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! the predicate and otherwise N logN, where N is last - first.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last,
const Compare& comp, const allocator_type& a)
: base_t(false, first, last, comp, a)
{}
//! <b>Effects</b>: Constructs an empty multimap and
//! inserts elements from the ordered range [first ,last). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last)
: base_t(ordered_range, first, last)
{}
//! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
//! inserts elements from the ordered range [first ,last). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
: base_t(ordered_range, first, last, comp)
{}
//! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
//! allocator, and inserts elements from the ordered range [first ,last). This function //! allocator, and inserts elements from the ordered range [first ,last). This function
@ -1329,41 +1389,51 @@ class multimap
//! //!
//! <b>Note</b>: Non-standard extension. //! <b>Note</b>: Non-standard extension.
template <class InputIterator> template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp = Compare(), BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp,
const allocator_type& a = allocator_type()) const allocator_type& a)
: base_t(ordered_range, first, last, comp, a) : base_t(ordered_range, first, last, comp, a)
{} {}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
//! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and //! <b>Effects</b>: Constructs an empty multimap and
//! allocator, and inserts elements from the range [il.begin(), il.end()). //! and inserts elements from the range [il.begin(), il.end()).
//! //!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is il.first() - il.end(). //! the predicate and otherwise N logN, where N is il.first() - il.end().
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list<value_type> il)
multimap(std::initializer_list<value_type> il, const Compare& comp = Compare(), : base_t(false, il.begin(), il.end())
const allocator_type& a = allocator_type()) {}
: base_t(false, il.begin(), il.end(), comp, a)
{
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Constructs an empty multimap using the specified //! <b>Effects</b>: Constructs an empty multimap using the specified
//! allocator, and inserts elements from the range [il.begin(), il.end()). //! allocator, and inserts elements from the range [il.begin(), il.end()).
//! //!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is il.first() - il.end(). //! the predicate and otherwise N logN, where N is il.first() - il.end().
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list<value_type> il, const allocator_type& a)
multimap(std::initializer_list<value_type> il, const allocator_type& a)
: base_t(false, il.begin(), il.end(), Compare(), a) : base_t(false, il.begin(), il.end(), Compare(), a)
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Constructs an empty set using the specified comparison object and //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
//! allocator, and inserts elements from the ordered range [il.begin(), il.end()). This function //! inserts elements from the range [il.begin(), il.end()).
//!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! the predicate and otherwise N logN, where N is il.first() - il.end().
BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list<value_type> il, const Compare& comp)
: base_t(false, il.begin(), il.end(), comp)
{}
//! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
//! allocator, and inserts elements from the range [il.begin(), il.end()).
//!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! the predicate and otherwise N logN, where N is il.first() - il.end().
BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
: base_t(false, il.begin(), il.end(), comp, a)
{}
//! <b>Effects</b>: Constructs an empty map and
//! inserts elements from the ordered range [il.begin(), il.end()). This function
//! is more efficient than the normal range creation for ordered ranges. //! is more efficient than the normal range creation for ordered ranges.
//! //!
//! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate. //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
@ -1371,14 +1441,36 @@ class multimap
//! <b>Complexity</b>: Linear in N. //! <b>Complexity</b>: Linear in N.
//! //!
//! <b>Note</b>: Non-standard extension. //! <b>Note</b>: Non-standard extension.
BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list<value_type> il)
multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp = Compare(), : base_t(ordered_range, il.begin(), il.end())
const allocator_type& a = allocator_type()) {}
//! <b>Effects</b>: Constructs an empty map using the specified comparison object and
//! inserts elements from the ordered range [il.begin(), il.end()). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp)
: base_t(ordered_range, il.begin(), il.end(), comp)
{}
//! <b>Effects</b>: Constructs an empty map and
//! inserts elements from the ordered range [il.begin(), il.end()). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
: base_t(ordered_range, il.begin(), il.end(), comp, a) : base_t(ordered_range, il.begin(), il.end(), comp, a)
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
#endif #endif
//! <b>Effects</b>: Copy constructs a multimap. //! <b>Effects</b>: Copy constructs a multimap.
@ -1386,10 +1478,7 @@ class multimap
//! <b>Complexity</b>: Linear in x.size(). //! <b>Complexity</b>: Linear in x.size().
BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x) BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x)
: base_t(static_cast<const base_t&>(x)) : base_t(static_cast<const base_t&>(x))
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Move constructs a multimap. Constructs *this using x's resources. //! <b>Effects</b>: Move constructs a multimap. Constructs *this using x's resources.
//! //!
@ -1399,20 +1488,14 @@ class multimap
BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x) BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x)
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value) BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
: base_t(BOOST_MOVE_BASE(base_t, x)) : base_t(BOOST_MOVE_BASE(base_t, x))
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Copy constructs a multimap. //! <b>Effects</b>: Copy constructs a multimap.
//! //!
//! <b>Complexity</b>: Linear in x.size(). //! <b>Complexity</b>: Linear in x.size().
BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x, const allocator_type &a) BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x, const allocator_type &a)
: base_t(static_cast<const base_t&>(x), a) : base_t(static_cast<const base_t&>(x), a)
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Move constructs a multimap using the specified allocator. //! <b>Effects</b>: Move constructs a multimap using the specified allocator.
//! Constructs *this using x's resources. //! Constructs *this using x's resources.
@ -1421,10 +1504,7 @@ class multimap
//! <b>Postcondition</b>: x is emptied. //! <b>Postcondition</b>: x is emptied.
BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x, const allocator_type &a) BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x, const allocator_type &a)
: base_t(BOOST_MOVE_BASE(base_t, x), a) : base_t(BOOST_MOVE_BASE(base_t, x), a)
{ {}
//A type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename Allocator::value_type>::value));
}
//! <b>Effects</b>: Makes *this a copy of x. //! <b>Effects</b>: Makes *this a copy of x.
//! //!
@ -1708,7 +1788,7 @@ class multimap
//! //!
//! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size()) //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
template<class C2> template<class C2>
void merge(multimap<Key, T, C2, Allocator, Options>& source) BOOST_CONTAINER_FORCEINLINE void merge(multimap<Key, T, C2, Allocator, Options>& source)
{ {
typedef container_detail::tree typedef container_detail::tree
<value_type_impl, select_1st_t, C2, Allocator, Options> base2_t; <value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
@ -1717,12 +1797,12 @@ class multimap
//! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&) //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
template<class C2> template<class C2>
void merge(BOOST_RV_REF_BEG multimap<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source) BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multimap<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
{ return this->merge(static_cast<multimap<Key, T, C2, Allocator, Options>&>(source)); } { return this->merge(static_cast<multimap<Key, T, C2, Allocator, Options>&>(source)); }
//! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&) //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
template<class C2> template<class C2>
void merge(map<Key, T, C2, Allocator, Options>& source) BOOST_CONTAINER_FORCEINLINE void merge(map<Key, T, C2, Allocator, Options>& source)
{ {
typedef container_detail::tree typedef container_detail::tree
<value_type_impl, select_1st_t, C2, Allocator, Options> base2_t; <value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
@ -1731,7 +1811,7 @@ class multimap
//! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&) //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
template<class C2> template<class C2>
void merge(BOOST_RV_REF_BEG map<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source) BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG map<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
{ return this->merge(static_cast<map<Key, T, C2, Allocator, Options>&>(source)); } { return this->merge(static_cast<map<Key, T, C2, Allocator, Options>&>(source)); }
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)

View file

@ -23,7 +23,7 @@
#include <boost/container/detail/workaround.hpp> #include <boost/container/detail/workaround.hpp>
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
#include <boost/container/detail/placement_new.hpp> #include <boost/container/detail/placement_new.hpp>
#include <boost/container/detail/to_raw_pointer.hpp> #include <boost/move/detail/to_raw_pointer.hpp>
#include <boost/container/allocator_traits.hpp> #include <boost/container/allocator_traits.hpp>
#include <boost/container/detail/mpl.hpp> #include <boost/container/detail/mpl.hpp>
@ -40,20 +40,34 @@ namespace container {
///@cond ///@cond
template<class Value, class KeyMapped, bool keymapped_is_void = container_detail::is_same<KeyMapped, void>::value> template<class Value, class KeyMapped>
struct node_handle_keymapped_traits struct node_handle_keymapped_traits
{
typedef typename KeyMapped::key_type key_type;
typedef typename KeyMapped::mapped_type mapped_type;
};
template<class Value>
struct node_handle_keymapped_traits<Value, void>
{ {
typedef Value key_type; typedef Value key_type;
typedef Value mapped_type; typedef Value mapped_type;
}; };
template<class Value, class KeyMapped> class node_handle_friend
struct node_handle_keymapped_traits<Value, KeyMapped, false>
{ {
typedef typename KeyMapped::key_type key_type; public:
typedef typename KeyMapped::mapped_type mapped_type;
template<class NH>
BOOST_CONTAINER_FORCEINLINE static void destroy_alloc(NH &nh) BOOST_NOEXCEPT
{ nh.destroy_alloc(); }
template<class NH>
BOOST_CONTAINER_FORCEINLINE static typename NH::node_pointer &get_node_pointer(NH &nh) BOOST_NOEXCEPT
{ return nh.get_node_pointer(); }
}; };
///@endcond ///@endcond
//! A node_handle is an object that accepts ownership of a single element from an associative container. //! A node_handle is an object that accepts ownership of a single element from an associative container.
@ -73,76 +87,63 @@ struct node_handle_keymapped_traits<Value, KeyMapped, false>
//! //!
//! If a node handle is not empty, then it contains an allocator that is equal to the allocator of the container //! If a node handle is not empty, then it contains an allocator that is equal to the allocator of the container
//! when the element was extracted. If a node handle is empty, it contains no allocator. //! when the element was extracted. If a node handle is empty, it contains no allocator.
template <class NodeType, class Value, class Allocator, class KeyMapped = void> template <class NodeAllocator, class KeyMapped = void>
class node_handle class node_handle
{ {
typedef node_handle_keymapped_traits<Value, KeyMapped> keymapped_t; typedef NodeAllocator nallocator_type;
typedef allocator_traits<NodeAllocator> nator_traits;
typedef typename nator_traits::value_type priv_node_t;
typedef typename priv_node_t::value_type priv_value_t;
typedef node_handle_keymapped_traits<priv_value_t, KeyMapped> keymapped_t;
public: public:
typedef Value value_type; typedef priv_value_t value_type;
typedef typename keymapped_t::key_type key_type; typedef typename keymapped_t::key_type key_type;
typedef typename keymapped_t::mapped_type mapped_type; typedef typename keymapped_t::mapped_type mapped_type;
typedef Allocator allocator_type; typedef typename nator_traits::template portable_rebind_alloc
typedef NodeType container_node_type; <value_type>::type allocator_type;
typedef priv_node_t container_node_type;
friend class node_handle_friend;
///@cond ///@cond
private: private:
BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle) BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle)
typedef allocator_traits<allocator_type> ator_traits; typedef typename nator_traits::pointer node_pointer;
typedef typename ator_traits::template portable_rebind_alloc
<container_node_type>::type nallocator_type;
typedef allocator_traits<nallocator_type> node_ator_traits;
typedef typename node_ator_traits::pointer node_pointer;
typedef ::boost::aligned_storage typedef ::boost::aligned_storage
<sizeof(allocator_type), boost::alignment_of<nallocator_type>::value> nalloc_storage_t; < sizeof(nallocator_type)
, boost::alignment_of<nallocator_type>::value> nalloc_storage_t;
node_pointer m_ptr; node_pointer m_ptr;
nalloc_storage_t m_nalloc_storage; nalloc_storage_t m_nalloc_storage;
void move_construct_alloc(nallocator_type &al) void move_construct_alloc(nallocator_type &al)
{ ::new(m_nalloc_storage.address(), boost_container_new_t()) allocator_type(::boost::move(al)); } { ::new(m_nalloc_storage.address(), boost_container_new_t()) nallocator_type(::boost::move(al)); }
void destroy_node() void destroy_deallocate_node()
{ {
node_ator_traits::destroy(this->node_alloc(), container_detail::to_raw_pointer(m_ptr)); nator_traits::destroy(this->node_alloc(), boost::movelib::to_raw_pointer(m_ptr));
node_ator_traits::deallocate(this->node_alloc(), m_ptr, 1u); nator_traits::deallocate(this->node_alloc(), m_ptr, 1u);
} }
template<class OtherNodeHandle> template<class OtherNodeHandle>
void move_construct_end(OtherNodeHandle &nh) void move_construct_end(OtherNodeHandle &nh)
{ {
if(m_ptr){ if(m_ptr){
::new (m_nalloc_storage.address(), boost_container_new_t()) allocator_type(::boost::move(nh.node_alloc())); ::new (m_nalloc_storage.address(), boost_container_new_t()) nallocator_type(::boost::move(nh.node_alloc()));
nh.destroy_alloc(); node_handle_friend::destroy_alloc(nh);
nh.get_node_pointer() = node_pointer(); node_handle_friend::get_node_pointer(nh) = node_pointer();
} }
BOOST_ASSERT(nh.empty()); BOOST_ASSERT(nh.empty());
} }
public: void destroy_alloc() BOOST_NOEXCEPT
{ static_cast<nallocator_type*>(m_nalloc_storage.address())->~nallocator_type(); }
void destroy_alloc() node_pointer &get_node_pointer() BOOST_NOEXCEPT
{ static_cast<allocator_type*>(m_nalloc_storage.address())->~allocator_type(); }
node_pointer &get_node_pointer()
{ return m_ptr; } { return m_ptr; }
nallocator_type &node_alloc()
{ return *static_cast<nallocator_type*>(m_nalloc_storage.address()); }
const nallocator_type &node_alloc() const
{ return *static_cast<const nallocator_type*>(m_nalloc_storage.address()); }
node_pointer release()
{
node_pointer p(m_ptr);
m_ptr = node_pointer();
if(p)
this->destroy_alloc();
return p;
}
///@endcond ///@endcond
public: public:
@ -150,13 +151,13 @@ class node_handle
//! //!
//! <b>Postcondition</b>: this->empty() //! <b>Postcondition</b>: this->empty()
BOOST_CXX14_CONSTEXPR node_handle() BOOST_NOEXCEPT BOOST_CXX14_CONSTEXPR node_handle() BOOST_NOEXCEPT
: m_ptr(), m_nalloc_storage() : m_ptr()
{ BOOST_ASSERT(this->empty()); } { }
//! <b>Effects</b>: Constructs a node_handle object initializing internal pointer with p. //! <b>Effects</b>: Constructs a node_handle object initializing internal pointer with p.
//! If p != nullptr copy constructs internal allocator al. //! If p != nullptr copy constructs internal allocator from al.
node_handle(node_pointer p, const nallocator_type &al) BOOST_NOEXCEPT node_handle(node_pointer p, const nallocator_type &al) BOOST_NOEXCEPT
: m_ptr(p), m_nalloc_storage() : m_ptr(p)
{ {
if(m_ptr){ if(m_ptr){
::new (m_nalloc_storage.address(), boost_container_new_t()) nallocator_type(al); ::new (m_nalloc_storage.address(), boost_container_new_t()) nallocator_type(al);
@ -172,12 +173,12 @@ class node_handle
//! <b>Note</b>: Two node_handle's are related if only one of KeyMapped template parameter //! <b>Note</b>: Two node_handle's are related if only one of KeyMapped template parameter
//! of a node handle is void. //! of a node handle is void.
template<class KeyMapped2> template<class KeyMapped2>
node_handle( BOOST_RV_REF_BEG node_handle<NodeType, Value, Allocator, KeyMapped2> BOOST_RV_REF_END nh node_handle( BOOST_RV_REF_BEG node_handle<NodeAllocator, KeyMapped2> BOOST_RV_REF_END nh
, typename container_detail::enable_if_c , typename container_detail::enable_if_c
< ((unsigned)container_detail::is_same<KeyMapped, void>::value + < ((unsigned)container_detail::is_same<KeyMapped, void>::value +
(unsigned)container_detail::is_same<KeyMapped2, void>::value) == 1u (unsigned)container_detail::is_same<KeyMapped2, void>::value) == 1u
>::type* = 0) >::type* = 0) BOOST_NOEXCEPT
: m_ptr(nh.get_node_pointer()), m_nalloc_storage() : m_ptr(nh.get())
{ this->move_construct_end(nh); } { this->move_construct_end(nh); }
//! <b>Effects</b>: Constructs a node_handle object initializing internal pointer with nh's internal pointer //! <b>Effects</b>: Constructs a node_handle object initializing internal pointer with nh's internal pointer
@ -186,43 +187,44 @@ class node_handle
//! //!
//! <b>Postcondition</b>: nh.empty() //! <b>Postcondition</b>: nh.empty()
node_handle (BOOST_RV_REF(node_handle) nh) BOOST_NOEXCEPT node_handle (BOOST_RV_REF(node_handle) nh) BOOST_NOEXCEPT
: m_ptr(nh.m_ptr), m_nalloc_storage() : m_ptr(nh.m_ptr)
{ this->move_construct_end(nh); } { this->move_construct_end(nh); }
//! <b>Effects</b>: If !this->empty(), destroys the value_type subobject in the container_node_type object //! <b>Effects</b>: If !this->empty(), destroys the value_type subobject in the container_node_type object
//! pointed to by c by calling allocator_traits<impl_defined>::destroy, then deallocates m_ptr by calling //! pointed to by c by calling allocator_traits<impl_defined>::destroy, then deallocates m_ptr by calling
//! ator_traits::rebind_traits<container_node_type>::deallocate. //! nator_traits::rebind_traits<container_node_type>::deallocate.
~node_handle () BOOST_NOEXCEPT ~node_handle() BOOST_NOEXCEPT
{ {
if(!this->empty()){ if(!this->empty()){
this->destroy_node(); this->destroy_deallocate_node();
this->destroy_alloc(); this->destroy_alloc();
} }
} }
//! <b>Requires</b>: Either this->empty(), or ator_traits::propagate_on_container_move_assignment is true, or //! <b>Requires</b>: Either this->empty(), or nator_traits::propagate_on_container_move_assignment is true, or
//! node_alloc() == nh.node_alloc(). //! node_alloc() == nh.node_alloc().
//! //!
//! <b>Effects</b>: If m_ptr != nullptr, destroys the value_type subobject in the container_node_type object //! <b>Effects</b>: If m_ptr != nullptr, destroys the value_type subobject in the container_node_type object
//! pointed to by m_ptr by calling ator_traits::destroy, then deallocates m_ptr by calling ator_- //! pointed to by m_ptr by calling nator_traits::destroy, then deallocates m_ptr by calling
//! traits::rebind_traits<container_node_type>::deallocate. Assigns nh.m_ptr to m_ptr. If this->empty() //! nator_traits::deallocate. Assigns nh.m_ptr to m_ptr. If this->empty()
//! or ator_traits::propagate_on_container_move_assignment is true, move assigns nh.node_alloc() to //! or nator_traits::propagate_on_container_move_assignment is true, move assigns nh.node_alloc() to
//! node_alloc(). Assigns nullptr to nh.m_ptr and assigns nullopt to nh.node_alloc(). //! node_alloc(). Assigns nullptr to nh.m_ptr and assigns nullopt to nh.node_alloc().
//!
//! <b>Returns</b>: *this. //! <b>Returns</b>: *this.
//! //!
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
node_handle & operator=(BOOST_RV_REF(node_handle) nh) node_handle & operator=(BOOST_RV_REF(node_handle) nh) BOOST_NOEXCEPT
{ {
BOOST_ASSERT(this->empty() || nh.empty() || ator_traits::propagate_on_container_move_assignment::value BOOST_ASSERT(this->empty() || nator_traits::propagate_on_container_move_assignment::value
|| ator_traits::equal(node_alloc(), nh.node_alloc())); || nator_traits::equal(node_alloc(), nh.node_alloc()));
bool const was_this_non_null = !this->empty(); bool const was_this_non_null = !this->empty();
bool const was_nh_non_null = !nh.empty(); bool const was_nh_non_null = !nh.empty();
if(was_nh_non_null){ if(was_nh_non_null){
if(was_this_non_null){ if(was_this_non_null){
this->destroy_node(); this->destroy_deallocate_node();
if(ator_traits::propagate_on_container_move_assignment::value){ if(nator_traits::propagate_on_container_move_assignment::value){
this->node_alloc() = ::boost::move(nh.node_alloc()); this->node_alloc() = ::boost::move(nh.node_alloc());
} }
} }
@ -234,7 +236,7 @@ class node_handle
nh.destroy_alloc(); nh.destroy_alloc();
} }
else if(was_this_non_null){ else if(was_this_non_null){
this->destroy_node(); this->destroy_deallocate_node();
this->destroy_alloc(); this->destroy_alloc();
m_ptr = node_pointer(); m_ptr = node_pointer();
} }
@ -310,23 +312,23 @@ class node_handle
return !this->m_ptr; return !this->m_ptr;
} }
//! <b>Requires</b>: this->empty(), or nh.empty(), or ator_traits::propagate_on_container_swap is true, or //! <b>Requires</b>: this->empty(), or nh.empty(), or nator_traits::propagate_on_container_swap is true, or
//! node_alloc() == nh.node_alloc(). //! node_alloc() == nh.node_alloc().
//! //!
//! <b>Effects</b>: Calls swap(m_ptr, nh.m_ptr). If this->empty(), or nh.empty(), or ator_traits::propagate_on_- //! <b>Effects</b>: Calls swap(m_ptr, nh.m_ptr). If this->empty(), or nh.empty(), or nator_traits::propagate_on_-
//! container_swap is true calls swap(node_alloc(), nh.node_alloc()). //! container_swap is true calls swap(node_alloc(), nh.node_alloc()).
void swap(node_handle &nh) void swap(node_handle &nh)
BOOST_NOEXCEPT_IF(ator_traits::propagate_on_container_swap::value || ator_traits::is_always_equal::value) BOOST_NOEXCEPT_IF(nator_traits::propagate_on_container_swap::value || nator_traits::is_always_equal::value)
{ {
BOOST_ASSERT(this->empty() || nh.empty() || ator_traits::propagate_on_container_swap::value BOOST_ASSERT(this->empty() || nh.empty() || nator_traits::propagate_on_container_swap::value
|| ator_traits::equal(node_alloc(), nh.node_alloc())); || nator_traits::equal(node_alloc(), nh.node_alloc()));
bool const was_this_non_null = !this->empty(); bool const was_this_non_null = !this->empty();
bool const was_nh_non_null = !nh.empty(); bool const was_nh_non_null = !nh.empty();
if(was_nh_non_null){ if(was_nh_non_null){
if(was_this_non_null){ if(was_this_non_null){
if(ator_traits::propagate_on_container_swap::value){ if(nator_traits::propagate_on_container_swap::value){
::boost::adl_move_swap(this->node_alloc(), nh.node_alloc()); ::boost::adl_move_swap(this->node_alloc(), nh.node_alloc());
} }
} }
@ -337,11 +339,53 @@ class node_handle
} }
else if(was_this_non_null){ else if(was_this_non_null){
nh.move_construct_alloc(this->node_alloc()); nh.move_construct_alloc(this->node_alloc());
nh.destroy_alloc(); this->destroy_alloc();
} }
::boost::adl_move_swap(m_ptr, nh.m_ptr); ::boost::adl_move_swap(m_ptr, nh.m_ptr);
} }
//! <b>Effects</b>: If this->empty() returns nullptr, otherwise returns m_ptr
//! resets m_ptr to nullptr and destroys the internal allocator.
//!
//! <b>Postcondition</b>: this->empty()
//!
//! <b>Note</b>: Non-standard extensions
node_pointer release() BOOST_NOEXCEPT
{
node_pointer p(m_ptr);
m_ptr = node_pointer();
if(p)
this->destroy_alloc();
return p;
}
//! <b>Effects</b>: Returns m_ptr.
//!
//! <b>Note</b>: Non-standard extensions
node_pointer get() const BOOST_NOEXCEPT
{
return m_ptr;
}
//! <b>Effects</b>: Returns a reference to the internal node allocator.
//!
//! <b>Note</b>: Non-standard extensions
nallocator_type &node_alloc() BOOST_NOEXCEPT
{
BOOST_ASSERT(!empty());
return *static_cast<nallocator_type*>(m_nalloc_storage.address());
}
//! <b>Effects</b>: Returns a reference to the internal node allocator.
//!
//! <b>Note</b>: Non-standard extensions
const nallocator_type &node_alloc() const BOOST_NOEXCEPT
{
BOOST_ASSERT(!empty());
return *static_cast<const nallocator_type*>(m_nalloc_storage.address());
}
//! <b>Effects</b>: x.swap(y). //! <b>Effects</b>: x.swap(y).
//! //!
friend void swap(node_handle & x, node_handle & y) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT(x.swap(y))) friend void swap(node_handle & x, node_handle & y) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT(x.swap(y)))

View file

@ -112,48 +112,105 @@ class set
//! <b>Effects</b>: Default constructs an empty set. //! <b>Effects</b>: Default constructs an empty set.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
set() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
container_detail::is_nothrow_default_constructible<Compare>::value) BOOST_CONTAINER_FORCEINLINE set()
BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
container_detail::is_nothrow_default_constructible<Compare>::value)
: base_t() : base_t()
{} {}
//! <b>Effects</b>: Constructs an empty set using the specified allocator object.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_FORCEINLINE explicit set(const allocator_type& a)
: base_t(a)
{}
//! <b>Effects</b>: Constructs an empty set using the specified comparison object.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_FORCEINLINE explicit set(const Compare& comp)
: base_t(comp)
{}
//! <b>Effects</b>: Constructs an empty set using the specified comparison object //! <b>Effects</b>: Constructs an empty set using the specified comparison object
//! and allocator. //! and allocator.
//! //!
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
explicit set(const Compare& comp, BOOST_CONTAINER_FORCEINLINE set(const Compare& comp, const allocator_type& a)
const allocator_type& a = allocator_type())
: base_t(comp, a) : base_t(comp, a)
{} {}
//! <b>Effects</b>: Constructs an empty set using the specified allocator object. //! <b>Effects</b>: Constructs an empty set using and
//! //! inserts elements from the range [first ,last ).
//! <b>Complexity</b>: Constant.
explicit set(const allocator_type& a)
: base_t(a)
{}
//! <b>Effects</b>: Constructs an empty set using the specified comparison object and
//! allocator, and inserts elements from the range [first ,last ).
//! //!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is last - first. //! the predicate and otherwise N logN, where N is last - first.
template <class InputIterator> template <class InputIterator>
set(InputIterator first, InputIterator last, const Compare& comp = Compare(), BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last)
const allocator_type& a = allocator_type()) : base_t(true, first, last)
: base_t(true, first, last, comp, a)
{} {}
//! <b>Effects</b>: Constructs an empty set using the specified //! <b>Effects</b>: Constructs an empty set using the specified
//! allocator, and inserts elements from the range [first ,last ). //! allocator, and inserts elements from the range [first ,last ).
//! //!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is last - first. //! the predicate and otherwise N logN, where N is last - first.
template <class InputIterator> template <class InputIterator>
set(InputIterator first, InputIterator last, const allocator_type& a) BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const allocator_type& a)
: base_t(true, first, last, key_compare(), a) : base_t(true, first, last, key_compare(), a)
{} {}
//! <b>Effects</b>: Constructs an empty set using the specified comparison object and
//! inserts elements from the range [first ,last ).
//!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! the predicate and otherwise N logN, where N is last - first.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const Compare& comp)
: base_t(true, first, last, comp)
{}
//! <b>Effects</b>: Constructs an empty set using the specified comparison object and
//! allocator, and inserts elements from the range [first ,last ).
//!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! the predicate and otherwise N logN, where N is last - first.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
: base_t(true, first, last, comp, a)
{}
//! <b>Effects</b>: Constructs an empty set and
//! inserts elements from the ordered unique range [first ,last). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
//! unique values.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last)
: base_t(ordered_range, first, last)
{}
//! <b>Effects</b>: Constructs an empty set using the specified comparison object and
//! inserts elements from the ordered unique range [first ,last). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
//! unique values.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp )
: base_t(ordered_range, first, last, comp)
{}
//! <b>Effects</b>: Constructs an empty set using the specified comparison object and //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
//! allocator, and inserts elements from the ordered unique range [first ,last). This function //! allocator, and inserts elements from the ordered unique range [first ,last). This function
//! is more efficient than the normal range creation for ordered ranges. //! is more efficient than the normal range creation for ordered ranges.
@ -165,30 +222,76 @@ class set
//! //!
//! <b>Note</b>: Non-standard extension. //! <b>Note</b>: Non-standard extension.
template <class InputIterator> template <class InputIterator>
set( ordered_unique_range_t, InputIterator first, InputIterator last BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last
, const Compare& comp = Compare(), const allocator_type& a = allocator_type()) , const Compare& comp, const allocator_type& a)
: base_t(ordered_range, first, last, comp, a) : base_t(ordered_range, first, last, comp, a)
{} {}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
//! <b>Effects</b>: Constructs an empty set using the specified comparison object and //! <b>Effects</b>: Constructs an empty set and
//! allocator, and inserts elements from the range [il.begin(), il.end()). //! inserts elements from the range [il.begin(), il.end()).
//! //!
//! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
//! comp and otherwise N logN, where N is il.begin() - il.end(). //! the predicate and otherwise N logN, where N is il.begin() - il.end().
set(std::initializer_list<value_type> il, const Compare& comp = Compare(), const allocator_type& a = allocator_type()) BOOST_CONTAINER_FORCEINLINE set(std::initializer_list<value_type> il)
: base_t(true, il.begin(), il.end(), comp, a) : base_t(true, il.begin(), il.end())
{} {}
//! <b>Effects</b>: Constructs an empty set using the specified //! <b>Effects</b>: Constructs an empty set using the specified
//! allocator, and inserts elements from the range [il.begin(), il.end()). //! allocator, and inserts elements from the range [il.begin(), il.end()).
//! //!
//! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
//! comp and otherwise N logN, where N is il.begin() - il.end(). //! the predicate and otherwise N logN, where N is il.begin() - il.end().
set(std::initializer_list<value_type> il, const allocator_type& a) BOOST_CONTAINER_FORCEINLINE set(std::initializer_list<value_type> il, const allocator_type& a)
: base_t(true, il.begin(), il.end(), Compare(), a) : base_t(true, il.begin(), il.end(), Compare(), a)
{} {}
//! <b>Effects</b>: Constructs an empty set using the specified comparison object and
//! inserts elements from the range [il.begin(), il.end()).
//!
//! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
//! the predicate and otherwise N logN, where N is il.begin() - il.end().
BOOST_CONTAINER_FORCEINLINE set(std::initializer_list<value_type> il, const Compare& comp )
: base_t(true, il.begin(), il.end(), comp)
{}
//! <b>Effects</b>: Constructs an empty set using the specified comparison object and
//! allocator, and inserts elements from the range [il.begin(), il.end()).
//!
//! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
//! the predicate and otherwise N logN, where N is il.begin() - il.end().
BOOST_CONTAINER_FORCEINLINE set(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
: base_t(true, il.begin(), il.end(), comp, a)
{}
//! <b>Effects</b>: Constructs an empty set and
//! inserts elements from the ordered unique range [il.begin(), il.end()). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
//! unique values.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list<value_type> il)
: base_t(ordered_range, il.begin(), il.end())
{}
//! <b>Effects</b>: Constructs an empty set using the specified comparison object and
//! inserts elements from the ordered unique range [il.begin(), il.end()). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
//! unique values.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp)
: base_t(ordered_range, il.begin(), il.end(), comp)
{}
//! <b>Effects</b>: Constructs an empty set using the specified comparison object and //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
//! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
//! is more efficient than the normal range creation for ordered ranges. //! is more efficient than the normal range creation for ordered ranges.
@ -199,8 +302,7 @@ class set
//! <b>Complexity</b>: Linear in N. //! <b>Complexity</b>: Linear in N.
//! //!
//! <b>Note</b>: Non-standard extension. //! <b>Note</b>: Non-standard extension.
set( ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp = Compare() BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
, const allocator_type& a = allocator_type())
: base_t(ordered_range, il.begin(), il.end(), comp, a) : base_t(ordered_range, il.begin(), il.end(), comp, a)
{} {}
#endif #endif
@ -208,7 +310,7 @@ class set
//! <b>Effects</b>: Copy constructs a set. //! <b>Effects</b>: Copy constructs a set.
//! //!
//! <b>Complexity</b>: Linear in x.size(). //! <b>Complexity</b>: Linear in x.size().
set(const set& x) BOOST_CONTAINER_FORCEINLINE set(const set& x)
: base_t(static_cast<const base_t&>(x)) : base_t(static_cast<const base_t&>(x))
{} {}
@ -217,7 +319,7 @@ class set
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
//! //!
//! <b>Postcondition</b>: x is emptied. //! <b>Postcondition</b>: x is emptied.
set(BOOST_RV_REF(set) x) BOOST_CONTAINER_FORCEINLINE set(BOOST_RV_REF(set) x)
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value) BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
: base_t(BOOST_MOVE_BASE(base_t, x)) : base_t(BOOST_MOVE_BASE(base_t, x))
{} {}
@ -225,7 +327,7 @@ class set
//! <b>Effects</b>: Copy constructs a set using the specified allocator. //! <b>Effects</b>: Copy constructs a set using the specified allocator.
//! //!
//! <b>Complexity</b>: Linear in x.size(). //! <b>Complexity</b>: Linear in x.size().
set(const set& x, const allocator_type &a) BOOST_CONTAINER_FORCEINLINE set(const set& x, const allocator_type &a)
: base_t(static_cast<const base_t&>(x), a) : base_t(static_cast<const base_t&>(x), a)
{} {}
@ -233,14 +335,14 @@ class set
//! Constructs *this using x's resources. //! Constructs *this using x's resources.
//! //!
//! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise. //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
set(BOOST_RV_REF(set) x, const allocator_type &a) BOOST_CONTAINER_FORCEINLINE set(BOOST_RV_REF(set) x, const allocator_type &a)
: base_t(BOOST_MOVE_BASE(base_t, x), a) : base_t(BOOST_MOVE_BASE(base_t, x), a)
{} {}
//! <b>Effects</b>: Makes *this a copy of x. //! <b>Effects</b>: Makes *this a copy of x.
//! //!
//! <b>Complexity</b>: Linear in x.size(). //! <b>Complexity</b>: Linear in x.size().
set& operator=(BOOST_COPY_ASSIGN_REF(set) x) BOOST_CONTAINER_FORCEINLINE set& operator=(BOOST_COPY_ASSIGN_REF(set) x)
{ return static_cast<set&>(this->base_t::operator=(static_cast<const base_t&>(x))); } { return static_cast<set&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
//! <b>Effects</b>: this->swap(x.get()). //! <b>Effects</b>: this->swap(x.get()).
@ -251,7 +353,7 @@ class set
//! <b>Complexity</b>: Constant if allocator_traits_type:: //! <b>Complexity</b>: Constant if allocator_traits_type::
//! propagate_on_container_move_assignment is true or //! propagate_on_container_move_assignment is true or
//! this->get>allocator() == x.get_allocator(). Linear otherwise. //! this->get>allocator() == x.get_allocator(). Linear otherwise.
set& operator=(BOOST_RV_REF(set) x) BOOST_CONTAINER_FORCEINLINE set& operator=(BOOST_RV_REF(set) x)
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
allocator_traits_type::is_always_equal::value) && allocator_traits_type::is_always_equal::value) &&
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value) boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
@ -424,7 +526,7 @@ class set
//! //!
//! <b>Complexity</b>: Logarithmic. //! <b>Complexity</b>: Logarithmic.
template <class... Args> template <class... Args>
std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args) BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
{ return this->base_t::emplace_unique(boost::forward<Args>(args)...); } { return this->base_t::emplace_unique(boost::forward<Args>(args)...); }
//! <b>Effects</b>: Inserts an object of type Key constructed with //! <b>Effects</b>: Inserts an object of type Key constructed with
@ -437,18 +539,18 @@ class set
//! //!
//! <b>Complexity</b>: Logarithmic. //! <b>Complexity</b>: Logarithmic.
template <class... Args> template <class... Args>
iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
{ return this->base_t::emplace_hint_unique(p, boost::forward<Args>(args)...); } { return this->base_t::emplace_hint_unique(p, boost::forward<Args>(args)...); }
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#define BOOST_CONTAINER_SET_EMPLACE_CODE(N) \ #define BOOST_CONTAINER_SET_EMPLACE_CODE(N) \
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
{ return this->base_t::emplace_unique(BOOST_MOVE_FWD##N); }\ { return this->base_t::emplace_unique(BOOST_MOVE_FWD##N); }\
\ \
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
{ return this->base_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ { return this->base_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
// //
BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SET_EMPLACE_CODE) BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SET_EMPLACE_CODE)
@ -513,7 +615,7 @@ class set
//! //!
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last) //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
template <class InputIterator> template <class InputIterator>
void insert(InputIterator first, InputIterator last) BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
{ this->base_t::insert_unique(first, last); } { this->base_t::insert_unique(first, last); }
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
@ -521,16 +623,16 @@ class set
//! if there is no element with key equivalent to the key of that element. //! if there is no element with key equivalent to the key of that element.
//! //!
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end()) //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end())
void insert(std::initializer_list<value_type> il) BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
{ this->base_t::insert_unique(il.begin(), il.end()); } { this->base_t::insert_unique(il.begin(), il.end()); }
#endif #endif
//! @copydoc ::boost::container::map::insert(node_type&&) //! @copydoc ::boost::container::map::insert(node_type&&)
insert_return_type insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) BOOST_CONTAINER_FORCEINLINE insert_return_type insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
{ return this->base_t::insert_unique_node(boost::move(nh)); } { return this->base_t::insert_unique_node(boost::move(nh)); }
//! @copydoc ::boost::container::map::insert(const_iterator, node_type&&) //! @copydoc ::boost::container::map::insert(const_iterator, node_type&&)
insert_return_type insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) BOOST_CONTAINER_FORCEINLINE insert_return_type insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
{ return this->base_t::insert_unique_node(hint, boost::move(nh)); } { return this->base_t::insert_unique_node(hint, boost::move(nh)); }
//! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&) //! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
@ -586,6 +688,12 @@ class set
//! <b>Complexity</b>: log(size())+N where N is the distance from first to last. //! <b>Complexity</b>: log(size())+N where N is the distance from first to last.
iterator erase(const_iterator first, const_iterator last); iterator erase(const_iterator first, const_iterator last);
//! @copydoc ::boost::container::map::extract(const_iterator)
node_type extract(const_iterator p);
//! @copydoc ::boost::container::map::extract(const key_type&)
node_type extract(const key_type& x);
//! <b>Effects</b>: Swaps the contents of *this and x. //! <b>Effects</b>: Swaps the contents of *this and x.
//! //!
//! <b>Throws</b>: Nothing. //! <b>Throws</b>: Nothing.
@ -631,13 +739,13 @@ class set
//! <b>Returns</b>: The number of elements with key equivalent to x. //! <b>Returns</b>: The number of elements with key equivalent to x.
//! //!
//! <b>Complexity</b>: log(size())+count(k) //! <b>Complexity</b>: log(size())+count(k)
size_type count(const key_type& x) const BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
{ return static_cast<size_type>(this->base_t::find(x) != this->base_t::cend()); } { return static_cast<size_type>(this->base_t::find(x) != this->base_t::cend()); }
//! <b>Returns</b>: The number of elements with key equivalent to x. //! <b>Returns</b>: The number of elements with key equivalent to x.
//! //!
//! <b>Complexity</b>: log(size())+count(k) //! <b>Complexity</b>: log(size())+count(k)
size_type count(const key_type& x) BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x)
{ return static_cast<size_type>(this->base_t::find(x) != this->base_t::end()); } { return static_cast<size_type>(this->base_t::find(x) != this->base_t::end()); }
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
@ -671,13 +779,13 @@ class set
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
//! //!
//! <b>Complexity</b>: Logarithmic //! <b>Complexity</b>: Logarithmic
std::pair<iterator,iterator> equal_range(const key_type& x) BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& x)
{ return this->base_t::lower_bound_range(x); } { return this->base_t::lower_bound_range(x); }
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
//! //!
//! <b>Complexity</b>: Logarithmic //! <b>Complexity</b>: Logarithmic
std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
{ return this->base_t::lower_bound_range(x); } { return this->base_t::lower_bound_range(x); }
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
@ -737,11 +845,11 @@ class set
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
private: private:
template <class KeyType> template <class KeyType>
std::pair<iterator, bool> priv_insert(BOOST_FWD_REF(KeyType) x) BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> priv_insert(BOOST_FWD_REF(KeyType) x)
{ return this->base_t::insert_unique(::boost::forward<KeyType>(x)); } { return this->base_t::insert_unique(::boost::forward<KeyType>(x)); }
template <class KeyType> template <class KeyType>
iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x) BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x)
{ return this->base_t::insert_unique(p, ::boost::forward<KeyType>(x)); } { return this->base_t::insert_unique(p, ::boost::forward<KeyType>(x)); }
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
}; };
@ -829,36 +937,79 @@ class multiset
////////////////////////////////////////////// //////////////////////////////////////////////
//! @copydoc ::boost::container::set::set() //! @copydoc ::boost::container::set::set()
multiset() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value && BOOST_CONTAINER_FORCEINLINE multiset()
container_detail::is_nothrow_default_constructible<Compare>::value) BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
container_detail::is_nothrow_default_constructible<Compare>::value)
: base_t() : base_t()
{} {}
//! @copydoc ::boost::container::set::set(const Compare&, const allocator_type&)
explicit multiset(const Compare& comp,
const allocator_type& a = allocator_type())
: base_t(comp, a)
{}
//! @copydoc ::boost::container::set::set(const allocator_type&) //! @copydoc ::boost::container::set::set(const allocator_type&)
explicit multiset(const allocator_type& a) BOOST_CONTAINER_FORCEINLINE explicit multiset(const allocator_type& a)
: base_t(a) : base_t(a)
{} {}
//! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const Compare& comp, const allocator_type&) //! @copydoc ::boost::container::set::set(const Compare&)
BOOST_CONTAINER_FORCEINLINE explicit multiset(const Compare& comp)
: base_t(comp)
{}
//! @copydoc ::boost::container::set::set(const Compare&, const allocator_type&)
BOOST_CONTAINER_FORCEINLINE multiset(const Compare& comp, const allocator_type& a)
: base_t(comp, a)
{}
//! @copydoc ::boost::container::set::set(InputIterator, InputIterator)
template <class InputIterator> template <class InputIterator>
multiset(InputIterator first, InputIterator last, BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last)
const Compare& comp = Compare(), : base_t(false, first, last)
const allocator_type& a = allocator_type())
: base_t(false, first, last, comp, a)
{} {}
//! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const allocator_type&) //! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const allocator_type&)
template <class InputIterator> template <class InputIterator>
multiset(InputIterator first, InputIterator last, const allocator_type& a) BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const allocator_type& a)
: base_t(false, first, last, key_compare(), a) : base_t(false, first, last, key_compare(), a)
{} {}
//! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const Compare&)
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const Compare& comp)
: base_t(false, first, last, comp)
{}
//! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const Compare&, const allocator_type&)
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
: base_t(false, first, last, comp, a)
{}
//! <b>Effects</b>: Constructs an empty multiset and
//! and inserts elements from the ordered range [first ,last ). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last )
: base_t(ordered_range, first, last)
{}
//! <b>Effects</b>: Constructs an empty multiset using the specified comparison object and
//! inserts elements from the ordered range [first ,last ). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
: base_t(ordered_range, first, last, comp)
{}
//! <b>Effects</b>: Constructs an empty multiset using the specified comparison object and //! <b>Effects</b>: Constructs an empty multiset using the specified comparison object and
//! allocator, and inserts elements from the ordered range [first ,last ). This function //! allocator, and inserts elements from the ordered range [first ,last ). This function
//! is more efficient than the normal range creation for ordered ranges. //! is more efficient than the normal range creation for ordered ranges.
@ -869,56 +1020,74 @@ class multiset
//! //!
//! <b>Note</b>: Non-standard extension. //! <b>Note</b>: Non-standard extension.
template <class InputIterator> template <class InputIterator>
multiset( ordered_range_t, InputIterator first, InputIterator last BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
, const Compare& comp = Compare()
, const allocator_type& a = allocator_type())
: base_t(ordered_range, first, last, comp, a) : base_t(ordered_range, first, last, comp, a)
{} {}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
//! @copydoc ::boost::container::set::set(std::initializer_list<value_type>, const Compare& comp, const allocator_type&) //! @copydoc ::boost::container::set::set(std::initializer_list<value_type>)
multiset(std::initializer_list<value_type> il, const Compare& comp = Compare(), const allocator_type& a = allocator_type()) BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list<value_type> il)
: base_t(false, il.begin(), il.end(), comp, a) : base_t(false, il.begin(), il.end())
{} {}
//! @copydoc ::boost::container::set::set(std::initializer_list<value_type>, const allocator_type&) //! @copydoc ::boost::container::set::set(std::initializer_list<value_type>, const allocator_type&)
multiset(std::initializer_list<value_type> il, const allocator_type& a) BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list<value_type> il, const allocator_type& a)
: base_t(false, il.begin(), il.end(), Compare(), a) : base_t(false, il.begin(), il.end(), Compare(), a)
{} {}
//! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list<value_type>, const Compare& comp, const allocator_type&) //! @copydoc ::boost::container::set::set(std::initializer_list<value_type>, const Compare&)
multiset(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp = Compare(), const allocator_type& a = allocator_type()) BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list<value_type> il, const Compare& comp)
: base_t(false, il.begin(), il.end(), comp)
{}
//! @copydoc ::boost::container::set::set(std::initializer_list<value_type>, const Compare&, const allocator_type&)
BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
: base_t(false, il.begin(), il.end(), comp, a)
{}
//! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list<value_type>)
BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list<value_type> il)
: base_t(ordered_range, il.begin(), il.end())
{}
//! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list<value_type>, const Compare&)
BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp)
: base_t(ordered_range, il.begin(), il.end(), comp)
{}
//! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list<value_type>, const Compare&, const allocator_type&)
BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
: base_t(ordered_range, il.begin(), il.end(), comp, a) : base_t(ordered_range, il.begin(), il.end(), comp, a)
{} {}
#endif #endif
//! @copydoc ::boost::container::set::set(const set &) //! @copydoc ::boost::container::set::set(const set &)
multiset(const multiset& x) BOOST_CONTAINER_FORCEINLINE multiset(const multiset& x)
: base_t(static_cast<const base_t&>(x)) : base_t(static_cast<const base_t&>(x))
{} {}
//! @copydoc ::boost::container::set::set(set &&) //! @copydoc ::boost::container::set::set(set &&)
multiset(BOOST_RV_REF(multiset) x) BOOST_CONTAINER_FORCEINLINE multiset(BOOST_RV_REF(multiset) x)
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value) BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
: base_t(BOOST_MOVE_BASE(base_t, x)) : base_t(BOOST_MOVE_BASE(base_t, x))
{} {}
//! @copydoc ::boost::container::set::set(const set &, const allocator_type &) //! @copydoc ::boost::container::set::set(const set &, const allocator_type &)
multiset(const multiset& x, const allocator_type &a) BOOST_CONTAINER_FORCEINLINE multiset(const multiset& x, const allocator_type &a)
: base_t(static_cast<const base_t&>(x), a) : base_t(static_cast<const base_t&>(x), a)
{} {}
//! @copydoc ::boost::container::set::set(set &&, const allocator_type &) //! @copydoc ::boost::container::set::set(set &&, const allocator_type &)
multiset(BOOST_RV_REF(multiset) x, const allocator_type &a) BOOST_CONTAINER_FORCEINLINE multiset(BOOST_RV_REF(multiset) x, const allocator_type &a)
: base_t(BOOST_MOVE_BASE(base_t, x), a) : base_t(BOOST_MOVE_BASE(base_t, x), a)
{} {}
//! @copydoc ::boost::container::set::operator=(const set &) //! @copydoc ::boost::container::set::operator=(const set &)
multiset& operator=(BOOST_COPY_ASSIGN_REF(multiset) x) BOOST_CONTAINER_FORCEINLINE multiset& operator=(BOOST_COPY_ASSIGN_REF(multiset) x)
{ return static_cast<multiset&>(this->base_t::operator=(static_cast<const base_t&>(x))); } { return static_cast<multiset&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
//! @copydoc ::boost::container::set::operator=(set &&) //! @copydoc ::boost::container::set::operator=(set &&)
multiset& operator=(BOOST_RV_REF(multiset) x) BOOST_CONTAINER_FORCEINLINE multiset& operator=(BOOST_RV_REF(multiset) x)
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
allocator_traits_type::is_always_equal::value) && allocator_traits_type::is_always_equal::value) &&
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value) boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
@ -999,7 +1168,7 @@ class multiset
//! //!
//! <b>Complexity</b>: Logarithmic. //! <b>Complexity</b>: Logarithmic.
template <class... Args> template <class... Args>
iterator emplace(BOOST_FWD_REF(Args)... args) BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args)
{ return this->base_t::emplace_equal(boost::forward<Args>(args)...); } { return this->base_t::emplace_equal(boost::forward<Args>(args)...); }
//! <b>Effects</b>: Inserts an object of type Key constructed with //! <b>Effects</b>: Inserts an object of type Key constructed with
@ -1011,18 +1180,18 @@ class multiset
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
//! is inserted right before p. //! is inserted right before p.
template <class... Args> template <class... Args>
iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
{ return this->base_t::emplace_hint_equal(p, boost::forward<Args>(args)...); } { return this->base_t::emplace_hint_equal(p, boost::forward<Args>(args)...); }
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#define BOOST_CONTAINER_MULTISET_EMPLACE_CODE(N) \ #define BOOST_CONTAINER_MULTISET_EMPLACE_CODE(N) \
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
iterator emplace(BOOST_MOVE_UREF##N)\ BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\
{ return this->base_t::emplace_equal(BOOST_MOVE_FWD##N); }\ { return this->base_t::emplace_equal(BOOST_MOVE_FWD##N); }\
\ \
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
{ return this->base_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ { return this->base_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
// //
BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MULTISET_EMPLACE_CODE) BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MULTISET_EMPLACE_CODE)
@ -1079,21 +1248,21 @@ class multiset
//! //!
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last) //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
template <class InputIterator> template <class InputIterator>
void insert(InputIterator first, InputIterator last) BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
{ this->base_t::insert_equal(first, last); } { this->base_t::insert_equal(first, last); }
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
//! @copydoc ::boost::container::set::insert(std::initializer_list<value_type>) //! @copydoc ::boost::container::set::insert(std::initializer_list<value_type>)
void insert(std::initializer_list<value_type> il) BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
{ this->base_t::insert_equal(il.begin(), il.end()); } { this->base_t::insert_equal(il.begin(), il.end()); }
#endif #endif
//! @copydoc ::boost::container::multimap::insert(node_type&&) //! @copydoc ::boost::container::multimap::insert(node_type&&)
iterator insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
{ return this->base_t::insert_equal_node(boost::move(nh)); } { return this->base_t::insert_equal_node(boost::move(nh)); }
//! @copydoc ::boost::container::multimap::insert(const_iterator, node_type&&) //! @copydoc ::boost::container::multimap::insert(const_iterator, node_type&&)
iterator insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
{ return this->base_t::insert_equal_node(hint, boost::move(nh)); } { return this->base_t::insert_equal_node(hint, boost::move(nh)); }
//! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&) //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
@ -1135,6 +1304,12 @@ class multiset
//! @copydoc ::boost::container::set::erase(const_iterator,const_iterator) //! @copydoc ::boost::container::set::erase(const_iterator,const_iterator)
iterator erase(const_iterator first, const_iterator last); iterator erase(const_iterator first, const_iterator last);
//! @copydoc ::boost::container::multimap::extract(const_iterator)
node_type extract(const_iterator p);
//! @copydoc ::boost::container::multimap::extract(const key_type&)
node_type extract(const key_type& x);
//! @copydoc ::boost::container::set::swap //! @copydoc ::boost::container::set::swap
void swap(multiset& x) void swap(multiset& x)
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
@ -1219,11 +1394,11 @@ class multiset
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
private: private:
template <class KeyType> template <class KeyType>
iterator priv_insert(BOOST_FWD_REF(KeyType) x) BOOST_CONTAINER_FORCEINLINE iterator priv_insert(BOOST_FWD_REF(KeyType) x)
{ return this->base_t::insert_equal(::boost::forward<KeyType>(x)); } { return this->base_t::insert_equal(::boost::forward<KeyType>(x)); }
template <class KeyType> template <class KeyType>
iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x) BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x)
{ return this->base_t::insert_equal(p, ::boost::forward<KeyType>(x)); } { return this->base_t::insert_equal(p, ::boost::forward<KeyType>(x)); }
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED

View file

@ -387,8 +387,8 @@ class small_vector_base
this->steal_resources(x); this->steal_resources(x);
} }
else{ else{
this->assign( boost::make_move_iterator(container_detail::iterator_to_raw_pointer(x.begin())) this->assign( boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.begin()))
, boost::make_move_iterator(container_detail::iterator_to_raw_pointer(x.end ())) , boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.end ()))
); );
} }
} }

View file

@ -113,6 +113,8 @@ class static_vector
template<class U, std::size_t OtherCapacity> template<class U, std::size_t OtherCapacity>
friend class static_vector; friend class static_vector;
public:
typedef container_detail::static_storage_allocator<Value, Capacity> allocator_type;
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
public: public:
@ -252,6 +254,19 @@ public:
: base_t(other) : base_t(other)
{} {}
BOOST_CONTAINER_FORCEINLINE static_vector(static_vector const& other, const allocator_type &)
: base_t(other)
{}
BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF(static_vector) other, const allocator_type &)
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<value_type>::value)
: base_t(BOOST_MOVE_BASE(base_t, other))
{}
BOOST_CONTAINER_FORCEINLINE explicit static_vector(const allocator_type &)
: base_t()
{}
//! @pre <tt>other.size() <= capacity()</tt>. //! @pre <tt>other.size() <= capacity()</tt>.
//! //!
//! @brief Constructs a copy of other static_vector. //! @brief Constructs a copy of other static_vector.

View file

@ -51,31 +51,41 @@ namespace container {
inline void throw_bad_alloc() inline void throw_bad_alloc()
{ {
BOOST_ASSERT(!"boost::container bad_alloc thrown"); const char msg[] = "boost::container bad_alloc thrown";
(void)msg;
BOOST_ASSERT(!msg);
std::abort(); std::abort();
} }
inline void throw_out_of_range(const char* str) inline void throw_out_of_range(const char* str)
{ {
BOOST_ASSERT_MSG(!"boost::container out_of_range thrown", str); const char msg[] = "boost::container out_of_range thrown";
(void)msg; (void)str;
BOOST_ASSERT_MSG(!msg, str);
std::abort(); std::abort();
} }
inline void throw_length_error(const char* str) inline void throw_length_error(const char* str)
{ {
BOOST_ASSERT_MSG(!"boost::container length_error thrown", str); const char msg[] = "boost::container length_error thrown";
(void)msg; (void)str;
BOOST_ASSERT_MSG(!msg, str);
std::abort(); std::abort();
} }
inline void throw_logic_error(const char* str) inline void throw_logic_error(const char* str)
{ {
BOOST_ASSERT_MSG(!"boost::container logic_error thrown", str); const char msg[] = "boost::container logic_error thrown";
(void)msg; (void)str;
BOOST_ASSERT_MSG(!msg, str);
std::abort(); std::abort();
} }
inline void throw_runtime_error(const char* str) inline void throw_runtime_error(const char* str)
{ {
BOOST_ASSERT_MSG(!"boost::container runtime_error thrown", str); const char msg[] = "boost::container runtime_error thrown";
(void)msg; (void)str;
BOOST_ASSERT_MSG(!msg, str);
std::abort(); std::abort();
} }

View file

@ -36,10 +36,10 @@
#include <boost/container/detail/destroyers.hpp> #include <boost/container/detail/destroyers.hpp>
#include <boost/container/detail/iterator.hpp> #include <boost/container/detail/iterator.hpp>
#include <boost/container/detail/iterators.hpp> #include <boost/container/detail/iterators.hpp>
#include <boost/container/detail/iterator_to_raw_pointer.hpp> #include <boost/move/detail/iterator_to_raw_pointer.hpp>
#include <boost/container/detail/mpl.hpp> #include <boost/container/detail/mpl.hpp>
#include <boost/container/detail/next_capacity.hpp> #include <boost/container/detail/next_capacity.hpp>
#include <boost/container/detail/to_raw_pointer.hpp> #include <boost/move/detail/to_raw_pointer.hpp>
#include <boost/container/detail/type_traits.hpp> #include <boost/container/detail/type_traits.hpp>
#include <boost/container/detail/version_type.hpp> #include <boost/container/detail/version_type.hpp>
// intrusive // intrusive
@ -54,6 +54,10 @@
#include <boost/move/detail/fwd_macros.hpp> #include <boost/move/detail/fwd_macros.hpp>
#endif #endif
#include <boost/move/detail/move_helpers.hpp> #include <boost/move/detail/move_helpers.hpp>
// move/algo
#include <boost/move/algo/adaptive_merge.hpp>
#include <boost/move/algo/unique.hpp>
#include <boost/move/algo/predicate.hpp>
// other // other
#include <boost/core/no_exceptions_support.hpp> #include <boost/core/no_exceptions_support.hpp>
#include <boost/assert.hpp> #include <boost/assert.hpp>
@ -69,12 +73,8 @@ namespace container {
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
//#define BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
namespace container_detail { namespace container_detail {
#ifndef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
template <class Pointer, bool IsConst> template <class Pointer, bool IsConst>
class vec_iterator class vec_iterator
{ {
@ -256,45 +256,6 @@ BOOST_CONTAINER_FORCEINLINE Pointer &get_ptr(container_detail::vec_iterator<Poin
namespace container_detail { namespace container_detail {
#else //ifndef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
template< class MaybeConstPointer
, bool ElementTypeIsConst
= is_const< typename boost::intrusive::pointer_traits<MaybeConstPointer>::element_type>::value >
struct vector_get_ptr_pointer_to_non_const
{
typedef MaybeConstPointer const_pointer;
typedef boost::intrusive::pointer_traits<const_pointer> pointer_traits_t;
typedef typename pointer_traits_t::element_type element_type;
typedef typename remove_const<element_type>::type non_const_element_type;
typedef typename pointer_traits_t
::template rebind_pointer<non_const_element_type>::type return_type;
BOOST_CONTAINER_FORCEINLINE static return_type get_ptr(const const_pointer &ptr) BOOST_NOEXCEPT_OR_NOTHROW
{ return boost::intrusive::pointer_traits<return_type>::const_cast_from(ptr); }
};
template<class Pointer>
struct vector_get_ptr_pointer_to_non_const<Pointer, false>
{
typedef const Pointer & return_type;
BOOST_CONTAINER_FORCEINLINE static return_type get_ptr(const Pointer &ptr) BOOST_NOEXCEPT_OR_NOTHROW
{ return ptr; }
};
} //namespace container_detail {
template<class MaybeConstPointer>
BOOST_CONTAINER_FORCEINLINE typename container_detail::vector_get_ptr_pointer_to_non_const<MaybeConstPointer>::return_type
vector_iterator_get_ptr(const MaybeConstPointer &ptr) BOOST_NOEXCEPT_OR_NOTHROW
{
return container_detail::vector_get_ptr_pointer_to_non_const<MaybeConstPointer>::get_ptr(ptr);
}
namespace container_detail {
#endif //#ifndef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
struct uninitialized_size_t {}; struct uninitialized_size_t {};
static const uninitialized_size_t uninitialized_size = uninitialized_size_t(); static const uninitialized_size_t uninitialized_size = uninitialized_size_t();
@ -418,7 +379,7 @@ struct vector_alloc_holder
allocator_type &x_alloc = holder.alloc(); allocator_type &x_alloc = holder.alloc();
if(this->is_propagable_from(x_alloc, holder.start(), this_alloc, true)){ if(this->is_propagable_from(x_alloc, holder.start(), this_alloc, true)){
if(this->m_capacity){ if(this->m_capacity){
this->alloc().deallocate(this->m_start, this->m_capacity); allocator_traits_type::deallocate(this->alloc(), this->m_start, this->m_capacity);
} }
m_start = holder.m_start; m_start = holder.m_start;
m_capacity = holder.m_capacity; m_capacity = holder.m_capacity;
@ -454,7 +415,7 @@ struct vector_alloc_holder
BOOST_CONTAINER_FORCEINLINE ~vector_alloc_holder() BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE ~vector_alloc_holder() BOOST_NOEXCEPT_OR_NOTHROW
{ {
if(this->m_capacity){ if(this->m_capacity){
this->alloc().deallocate(this->m_start, this->m_capacity); allocator_traits_type::deallocate(this->alloc(), this->m_start, this->m_capacity);
} }
} }
@ -609,7 +570,7 @@ struct vector_alloc_holder<Allocator, version_0>
, m_size(holder.m_size) //Size is initialized here so vector should only call uninitialized_xxx after this , m_size(holder.m_size) //Size is initialized here so vector should only call uninitialized_xxx after this
{ {
::boost::container::uninitialized_move_alloc_n ::boost::container::uninitialized_move_alloc_n
(this->alloc(), container_detail::to_raw_pointer(holder.start()), m_size, container_detail::to_raw_pointer(this->start())); (this->alloc(), boost::movelib::to_raw_pointer(holder.start()), m_size, boost::movelib::to_raw_pointer(this->start()));
} }
template<class OtherAllocator, class OtherAllocatorVersion> template<class OtherAllocator, class OtherAllocatorVersion>
@ -621,7 +582,7 @@ struct vector_alloc_holder<Allocator, version_0>
const size_type n = holder.m_size; const size_type n = holder.m_size;
this->priv_first_allocation(n); this->priv_first_allocation(n);
::boost::container::uninitialized_move_alloc_n ::boost::container::uninitialized_move_alloc_n
(this->alloc(), container_detail::to_raw_pointer(holder.start()), n, container_detail::to_raw_pointer(this->start())); (this->alloc(), boost::movelib::to_raw_pointer(holder.start()), n, boost::movelib::to_raw_pointer(this->start()));
} }
BOOST_CONTAINER_FORCEINLINE void priv_first_allocation(size_type cap) BOOST_CONTAINER_FORCEINLINE void priv_first_allocation(size_type cap)
@ -675,8 +636,8 @@ struct vector_alloc_holder<Allocator, version_0>
void priv_deep_swap(vector_alloc_holder<OtherAllocator, OtherAllocatorVersion> &x) void priv_deep_swap(vector_alloc_holder<OtherAllocator, OtherAllocatorVersion> &x)
{ {
const size_type MaxTmpStorage = sizeof(value_type)*Allocator::internal_capacity; const size_type MaxTmpStorage = sizeof(value_type)*Allocator::internal_capacity;
value_type *const first_this = container_detail::to_raw_pointer(this->start()); value_type *const first_this = boost::movelib::to_raw_pointer(this->start());
value_type *const first_x = container_detail::to_raw_pointer(x.start()); value_type *const first_x = boost::movelib::to_raw_pointer(x.start());
if(this->m_size < x.m_size){ if(this->m_size < x.m_size){
boost::container::deep_swap_alloc_n<MaxTmpStorage>(this->alloc(), first_this, this->m_size, first_x, x.m_size); boost::container::deep_swap_alloc_n<MaxTmpStorage>(this->alloc(), first_this, this->m_size, first_x, x.m_size);
@ -747,13 +708,8 @@ class vector
typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type; typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
typedef Allocator allocator_type; typedef Allocator allocator_type;
typedef Allocator stored_allocator_type; typedef Allocator stored_allocator_type;
#if defined BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
typedef BOOST_CONTAINER_IMPDEF(pointer) iterator;
typedef BOOST_CONTAINER_IMPDEF(const_pointer) const_iterator;
#else
typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator; typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator; typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
#endif
typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator; typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator;
typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator; typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator;
@ -1186,7 +1142,7 @@ class vector
if (first == last){ if (first == last){
//There are no more elements in the sequence, erase remaining //There are no more elements in the sequence, erase remaining
T* const end_pos = this->priv_raw_end(); T* const end_pos = this->priv_raw_end();
const size_type n = static_cast<size_type>(end_pos - container_detail::iterator_to_raw_pointer(cur)); const size_type n = static_cast<size_type>(end_pos - boost::movelib::iterator_to_raw_pointer(cur));
this->priv_destroy_last_n(n); this->priv_destroy_last_n(n);
} }
else{ else{
@ -1238,7 +1194,7 @@ class vector
pointer const old_p = this->m_holder.start(); pointer const old_p = this->m_holder.start();
if(old_p){ if(old_p){
this->priv_destroy_all(); this->priv_destroy_all();
this->m_holder.alloc().deallocate(old_p, old_capacity); allocator_traits_type::deallocate(this->m_holder.alloc(), old_p, old_capacity);
} }
this->m_holder.start(ret); this->m_holder.start(ret);
this->m_holder.capacity(real_cap); this->m_holder.capacity(real_cap);
@ -2005,7 +1961,7 @@ class vector
{ {
BOOST_ASSERT(this->priv_in_range(position)); BOOST_ASSERT(this->priv_in_range(position));
const pointer p = vector_iterator_get_ptr(position); const pointer p = vector_iterator_get_ptr(position);
T *const pos_ptr = container_detail::to_raw_pointer(p); T *const pos_ptr = boost::movelib::to_raw_pointer(p);
T *const beg_ptr = this->priv_raw_begin(); T *const beg_ptr = this->priv_raw_begin();
T *const new_end_ptr = ::boost::container::move(pos_ptr + 1, beg_ptr + this->m_holder.m_size, pos_ptr); T *const new_end_ptr = ::boost::container::move(pos_ptr + 1, beg_ptr + this->m_holder.m_size, pos_ptr);
//Move elements forward and destroy last //Move elements forward and destroy last
@ -2025,9 +1981,9 @@ class vector
(first < last && this->priv_in_range(first) && this->priv_in_range_or_end(last))); (first < last && this->priv_in_range(first) && this->priv_in_range_or_end(last)));
if (first != last){ if (first != last){
T* const old_end_ptr = this->priv_raw_end(); T* const old_end_ptr = this->priv_raw_end();
T* const first_ptr = container_detail::to_raw_pointer(vector_iterator_get_ptr(first)); T* const first_ptr = boost::movelib::to_raw_pointer(vector_iterator_get_ptr(first));
T* const last_ptr = container_detail::to_raw_pointer(vector_iterator_get_ptr(last)); T* const last_ptr = boost::movelib::to_raw_pointer(vector_iterator_get_ptr(last));
T* const ptr = container_detail::to_raw_pointer(boost::container::move(last_ptr, old_end_ptr, first_ptr)); T* const ptr = boost::movelib::to_raw_pointer(boost::container::move(last_ptr, old_end_ptr, first_ptr));
this->priv_destroy_last_n(old_end_ptr - ptr); this->priv_destroy_last_n(old_end_ptr - ptr);
} }
return iterator(vector_iterator_get_ptr(first)); return iterator(vector_iterator_get_ptr(first));
@ -2231,46 +2187,19 @@ class vector
if(BOOST_LIKELY(s)){ if(BOOST_LIKELY(s)){
size_type const c = this->capacity(); size_type const c = this->capacity();
size_type const free_c = (c - s); size_type const free_c = (c - s);
//Use a new buffer if current one is too small for new elements, //Use a new buffer if current one is too small for new elements
//or there is no room for position indexes
if(free_c < n){ if(free_c < n){
size_type const new_size = s + n; this->priv_merge_in_new_buffer(UniqueBool(), first, n, comp, alloc_version());
size_type new_cap = new_size;
pointer p = pointer();
p = this->m_holder.allocation_command(allocate_new, new_size, new_cap, p);
this->priv_merge_in_new_buffer(UniqueBool(), first, n, comp, p, new_cap);
} }
else if(!UniqueBool::value && free_c >= n){ else{
typedef container_detail::vector_merge_cursor<T, size_type, BidirIt, Compare> inserter_t; T *raw_pos = boost::movelib::iterator_to_raw_pointer(this->insert(this->cend(), first, last));
T* const pbeg = this->priv_raw_begin(); T *raw_beg = this->priv_raw_begin();
return this->priv_insert_ordered_at(n, inserter_t(pbeg, pbeg + s, last, comp)); T *raw_end = this->priv_raw_end();
} boost::movelib::adaptive_merge(raw_beg, raw_pos, raw_end, comp, raw_end, free_c - n);
else{ //UniqueBool::value == true and free_c >= n if(UniqueBool::value){
std::size_t remaining = n; size_type const count =
static const std::size_t PosCount = 64u; static_cast<size_type>(raw_end - boost::movelib::unique(raw_beg, raw_end, boost::movelib::negate<Compare>(comp)));
size_type positions[PosCount]; this->priv_destroy_last_n(count);
size_type *indexes = 0;
while(remaining){
//Query for room to store indexes in the remaining buffer
boost::uintptr_t const szt_align_mask = container_detail::alignment_of<size_type>::value - 1;
boost::uintptr_t const addr = boost::uintptr_t(this->priv_raw_begin() + s + n);
boost::uintptr_t const capaddr = boost::uintptr_t(this->priv_raw_begin() + c);
boost::uintptr_t const aligned_addr = (addr + szt_align_mask) & ~szt_align_mask;
indexes = reinterpret_cast<size_type *>(aligned_addr);
std::size_t index_capacity = (aligned_addr >= capaddr) ? 0u : (capaddr - aligned_addr)/sizeof(size_type);
//Capacity is constant, we're not going to change it
if(index_capacity < PosCount){
indexes = positions;
index_capacity = PosCount;
}
if(index_capacity > remaining)
index_capacity = remaining;
BidirIt limit = first;
boost::container::iterator_advance(limit, index_capacity);
this->priv_insert_ordered_range(UniqueBool(), index_capacity, first, limit, indexes, comp);
first = limit;
remaining -= index_capacity;
} }
} }
} }
@ -2279,57 +2208,20 @@ class vector
} }
} }
template <class UniqueBool, class BidirIt, class Compare> template<class UniqueBool, class FwdIt, class Compare>
void priv_insert_ordered_range void priv_merge_in_new_buffer(UniqueBool, FwdIt, size_type, Compare, version_0)
(UniqueBool, size_type const n, BidirIt first, BidirIt const last, size_type positions[], Compare comp)
{ {
//Linear: at most N + M -1 comparisons throw_bad_alloc();
//Log: MlogN
//Average
//Linear: N + M - 2
//Log: MlogN
//N+M - 2
//N
//(N+M)/2 < MlogN
//(N/M+1)/2 <= logN
//bool const linear = !s || !n || (s <= n) || ((s+n)/n/2 < logN);
size_type const s = this->size();
size_type remaining = n;
T* const pbeg = this->priv_raw_begin();
T* const pend = pbeg + s;
T* pcur = pbeg;
size_type *position = positions;
size_type added_in_middle = 0;
if(first != last && pcur != pend){
while(1){
//maintain stability moving external values only if they are strictly less
if(comp(*first, *pcur)) {
*position = static_cast<size_type>(pcur - pbeg);
BOOST_ASSERT((position == positions) || (*(position-1) == size_type(-1)) || (*(position-1) <= *position));
++position;
++added_in_middle;
--remaining;
if(++first == last) break;
}
else if(UniqueBool::value && !comp(*pcur, *first)){
*position = size_type(-1);
++position;
--remaining;
if(++first == last) break;
}
else{
if(++pcur == pend) break;
}
}
}
this->insert_ordered_at(added_in_middle, position, first);
this->insert(this->cend(), remaining, first, last);
} }
template<class UniqueBool, class FwdIt, class Compare> template<class UniqueBool, class FwdIt, class Compare, class Version>
void priv_merge_in_new_buffer void priv_merge_in_new_buffer(UniqueBool, FwdIt first, size_type n, Compare comp, Version)
(UniqueBool, FwdIt first, size_type n, Compare comp, pointer new_storage, size_type const new_cap)
{ {
size_type const new_size = this->size() + n;
size_type new_cap = new_size;
pointer p = pointer();
pointer const new_storage = this->m_holder.allocation_command(allocate_new, new_size, new_cap, p);
BOOST_ASSERT((new_cap >= this->size() ) && (new_cap - this->size()) >= n); BOOST_ASSERT((new_cap >= this->size() ) && (new_cap - this->size()) >= n);
allocator_type &a = this->m_holder.alloc(); allocator_type &a = this->m_holder.alloc();
typename value_traits::ArrayDeallocator new_buffer_deallocator(new_storage, a, new_cap); typename value_traits::ArrayDeallocator new_buffer_deallocator(new_storage, a, new_cap);
@ -2337,7 +2229,7 @@ class vector
T* pbeg = this->priv_raw_begin(); T* pbeg = this->priv_raw_begin();
size_type const old_size = this->size(); size_type const old_size = this->size();
T* const pend = pbeg + old_size; T* const pend = pbeg + old_size;
T* d_first = container_detail::to_raw_pointer(new_storage); T* d_first = boost::movelib::to_raw_pointer(new_storage);
size_type added = n; size_type added = n;
//Merge in new buffer loop //Merge in new buffer loop
while(1){ while(1){
@ -2351,7 +2243,7 @@ class vector
} }
//maintain stability moving external values only if they are strictly less //maintain stability moving external values only if they are strictly less
else if(comp(*first, *pbeg)) { else if(comp(*first, *pbeg)) {
allocator_traits_type::construct( this->m_holder.alloc(), d_first, ::boost::move(*first) ); allocator_traits_type::construct( this->m_holder.alloc(), d_first, *first );
new_values_destroyer.increment_size(1u); new_values_destroyer.increment_size(1u);
++first; ++first;
--n; --n;
@ -2363,7 +2255,7 @@ class vector
--added; --added;
} }
else{ else{
allocator_traits_type::construct( this->m_holder.alloc(), d_first, ::boost::move(*pbeg) ); allocator_traits_type::construct( this->m_holder.alloc(), d_first, boost::move(*pbeg) );
new_values_destroyer.increment_size(1u); new_values_destroyer.increment_size(1u);
++pbeg; ++pbeg;
++d_first; ++d_first;
@ -2373,8 +2265,8 @@ class vector
//Nothrow operations //Nothrow operations
pointer const old_p = this->m_holder.start(); pointer const old_p = this->m_holder.start();
size_type const old_cap = this->m_holder.capacity(); size_type const old_cap = this->m_holder.capacity();
boost::container::destroy_alloc_n(a, container_detail::to_raw_pointer(old_p), old_size); boost::container::destroy_alloc_n(a, boost::movelib::to_raw_pointer(old_p), old_size);
a.deallocate(old_p, old_cap); allocator_traits_type::deallocate(a, old_p, old_cap);
this->m_holder.m_size = old_size + added; this->m_holder.m_size = old_size + added;
this->m_holder.start(new_storage); this->m_holder.start(new_storage);
this->m_holder.capacity(new_cap); this->m_holder.capacity(new_cap);
@ -2439,13 +2331,13 @@ class vector
} }
else if(is_propagable_from_x){ else if(is_propagable_from_x){
this->clear(); this->clear();
this->m_holder.alloc().deallocate(this->m_holder.m_start, this->m_holder.m_capacity); allocator_traits_type::deallocate(this->m_holder.alloc(), this->m_holder.m_start, this->m_holder.m_capacity);
this->m_holder.steal_resources(x.m_holder); this->m_holder.steal_resources(x.m_holder);
} }
//Else do a one by one move //Else do a one by one move
else{ else{
this->assign( boost::make_move_iterator(container_detail::iterator_to_raw_pointer(x.begin())) this->assign( boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.begin()))
, boost::make_move_iterator(container_detail::iterator_to_raw_pointer(x.end() )) , boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.end() ))
); );
} }
//Move allocator if needed //Move allocator if needed
@ -2514,8 +2406,8 @@ class vector
} }
//... and move-insert the remaining range //... and move-insert the remaining range
sml.insert( sml.cend() sml.insert( sml.cend()
, boost::make_move_iterator(container_detail::iterator_to_raw_pointer(big.nth(common_elements))) , boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(big.nth(common_elements)))
, boost::make_move_iterator(container_detail::iterator_to_raw_pointer(big.end())) , boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(big.end()))
); );
//Destroy remaining elements //Destroy remaining elements
big.erase(big.nth(common_elements), big.cend()); big.erase(big.nth(common_elements), big.cend());
@ -2540,7 +2432,7 @@ class vector
pointer const p = allocator_traits_type::allocate(this->m_holder.alloc(), new_cap, this->m_holder.m_start); pointer const p = allocator_traits_type::allocate(this->m_holder.alloc(), new_cap, this->m_holder.m_start);
//We will reuse insert code, so create a dummy input iterator //We will reuse insert code, so create a dummy input iterator
this->priv_forward_range_insert_new_allocation this->priv_forward_range_insert_new_allocation
( container_detail::to_raw_pointer(p), new_cap, this->priv_raw_end(), 0, this->priv_dummy_empty_proxy()); ( boost::movelib::to_raw_pointer(p), new_cap, this->priv_raw_end(), 0, this->priv_dummy_empty_proxy());
} }
void priv_reserve_no_capacity(size_type new_cap, version_2) void priv_reserve_no_capacity(size_type new_cap, version_2)
@ -2561,7 +2453,7 @@ class vector
this->m_holder.capacity(real_cap); this->m_holder.capacity(real_cap);
} }
else{ //If there is no forward expansion, move objects, we will reuse insertion code else{ //If there is no forward expansion, move objects, we will reuse insertion code
T * const new_mem = container_detail::to_raw_pointer(ret); T * const new_mem = boost::movelib::to_raw_pointer(ret);
T * const ins_pos = this->priv_raw_end(); T * const ins_pos = this->priv_raw_end();
if(reuse){ //Backwards (and possibly forward) expansion if(reuse){ //Backwards (and possibly forward) expansion
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
@ -2677,7 +2569,7 @@ class vector
if(cp){ if(cp){
const size_type sz = this->size(); const size_type sz = this->size();
if(!sz){ if(!sz){
this->m_holder.alloc().deallocate(this->m_holder.m_start, cp); allocator_traits_type::deallocate(this->m_holder.alloc(), this->m_holder.m_start, cp);
this->m_holder.m_start = pointer(); this->m_holder.m_start = pointer();
this->m_holder.m_capacity = 0; this->m_holder.m_capacity = 0;
} }
@ -2691,7 +2583,7 @@ class vector
++this->num_alloc; ++this->num_alloc;
#endif #endif
this->priv_forward_range_insert_new_allocation this->priv_forward_range_insert_new_allocation
( container_detail::to_raw_pointer(p), sz ( boost::movelib::to_raw_pointer(p), sz
, this->priv_raw_begin(), 0, this->priv_dummy_empty_proxy()); , this->priv_raw_begin(), 0, this->priv_dummy_empty_proxy());
} }
} }
@ -2703,7 +2595,7 @@ class vector
if(cp){ if(cp){
const size_type sz = this->size(); const size_type sz = this->size();
if(!sz){ if(!sz){
this->m_holder.alloc().deallocate(this->m_holder.m_start, cp); allocator_traits_type::deallocate(this->m_holder.alloc(), this->m_holder.m_start, cp);
this->m_holder.m_start = pointer(); this->m_holder.m_start = pointer();
this->m_holder.m_capacity = 0; this->m_holder.m_capacity = 0;
} }
@ -2735,11 +2627,11 @@ class vector
{ {
//Check if we have enough memory or try to expand current memory //Check if we have enough memory or try to expand current memory
const size_type n_pos = pos - this->m_holder.start(); const size_type n_pos = pos - this->m_holder.start();
T *const raw_pos = container_detail::to_raw_pointer(pos); T *const raw_pos = boost::movelib::to_raw_pointer(pos);
const size_type new_cap = this->m_holder.next_capacity(n); const size_type new_cap = this->m_holder.next_capacity(n);
//Pass the hint so that allocators can take advantage of this. //Pass the hint so that allocators can take advantage of this.
T * const new_buf = container_detail::to_raw_pointer T * const new_buf = boost::movelib::to_raw_pointer
(allocator_traits_type::allocate(this->m_holder.alloc(), new_cap, this->m_holder.m_start)); (allocator_traits_type::allocate(this->m_holder.alloc(), new_cap, this->m_holder.m_start));
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
++this->num_alloc; ++this->num_alloc;
@ -2754,7 +2646,7 @@ class vector
(const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, version_2) (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, version_2)
{ {
//Check if we have enough memory or try to expand current memory //Check if we have enough memory or try to expand current memory
T *const raw_pos = container_detail::to_raw_pointer(pos); T *const raw_pos = boost::movelib::to_raw_pointer(pos);
const size_type n_pos = raw_pos - this->priv_raw_begin(); const size_type n_pos = raw_pos - this->priv_raw_begin();
//There is not enough memory, allocate a new //There is not enough memory, allocate a new
@ -2781,7 +2673,7 @@ class vector
++this->num_expand_bwd; ++this->num_expand_bwd;
#endif #endif
this->priv_forward_range_insert_expand_backwards this->priv_forward_range_insert_expand_backwards
(container_detail::to_raw_pointer(ret), real_cap, raw_pos, n, insert_range_proxy); (boost::movelib::to_raw_pointer(ret), real_cap, raw_pos, n, insert_range_proxy);
} }
} }
//New buffer //New buffer
@ -2790,7 +2682,7 @@ class vector
++this->num_alloc; ++this->num_alloc;
#endif #endif
this->priv_forward_range_insert_new_allocation this->priv_forward_range_insert_new_allocation
( container_detail::to_raw_pointer(ret), real_cap, raw_pos, n, insert_range_proxy); ( boost::movelib::to_raw_pointer(ret), real_cap, raw_pos, n, insert_range_proxy);
} }
return iterator(this->m_holder.start() + n_pos); return iterator(this->m_holder.start() + n_pos);
@ -2810,7 +2702,7 @@ class vector
} }
else{ else{
//Expand forward //Expand forward
T *const raw_pos = container_detail::to_raw_pointer(pos); T *const raw_pos = boost::movelib::to_raw_pointer(pos);
const size_type n_pos = raw_pos - this->priv_raw_begin(); const size_type n_pos = raw_pos - this->priv_raw_begin();
this->priv_forward_range_insert_expand_forward(raw_pos, n, insert_range_proxy); this->priv_forward_range_insert_expand_forward(raw_pos, n, insert_range_proxy);
return iterator(this->m_holder.start() + n_pos); return iterator(this->m_holder.start() + n_pos);
@ -2926,10 +2818,10 @@ class vector
} }
private: private:
T *priv_raw_begin() const BOOST_CONTAINER_FORCEINLINE T *priv_raw_begin() const
{ return container_detail::to_raw_pointer(m_holder.start()); } { return boost::movelib::to_raw_pointer(m_holder.start()); }
T* priv_raw_end() const BOOST_CONTAINER_FORCEINLINE T* priv_raw_end() const
{ return this->priv_raw_begin() + this->m_holder.m_size; } { return this->priv_raw_begin() + this->m_holder.m_size; }
template <class InsertionProxy> template <class InsertionProxy>
@ -3017,7 +2909,7 @@ class vector
//If there is allocated memory, destroy and deallocate //If there is allocated memory, destroy and deallocate
if(!value_traits::trivial_dctr_after_move) if(!value_traits::trivial_dctr_after_move)
boost::container::destroy_alloc_n(this->get_stored_allocator(), old_buffer, this->m_holder.m_size); boost::container::destroy_alloc_n(this->get_stored_allocator(), old_buffer, this->m_holder.m_size);
this->m_holder.alloc().deallocate(this->m_holder.start(), this->m_holder.capacity()); allocator_traits_type::deallocate(this->m_holder.alloc(), this->m_holder.start(), this->m_holder.capacity());
} }
this->m_holder.start(new_start); this->m_holder.start(new_start);
this->m_holder.m_size = new_finish - new_start; this->m_holder.m_size = new_finish - new_start;

View file

@ -42,7 +42,7 @@ addressof(T& o) BOOST_NOEXCEPT
} /* boost */ } /* boost */
#else #else
#include <boost/detail/workaround.hpp> #include <boost/config/workaround.hpp>
#include <cstddef> #include <cstddef>
namespace boost { namespace boost {
@ -117,7 +117,6 @@ struct address_of<const volatile addressof_null_t> {
} /* detail */ } /* detail */
#if defined(BOOST_NO_CXX11_SFINAE_EXPR) || \ #if defined(BOOST_NO_CXX11_SFINAE_EXPR) || \
defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
defined(BOOST_NO_CXX11_CONSTEXPR) || \ defined(BOOST_NO_CXX11_CONSTEXPR) || \
defined(BOOST_NO_CXX11_DECLTYPE) defined(BOOST_NO_CXX11_DECLTYPE)
#define BOOST_CORE_NO_CONSTEXPR_ADDRESSOF #define BOOST_CORE_NO_CONSTEXPR_ADDRESSOF
@ -171,7 +170,7 @@ const T (*addressof(const T (&o)[N]) BOOST_NOEXCEPT)[N]
namespace detail { namespace detail {
template<class T> template<class T>
T&& addressof_declval() BOOST_NOEXCEPT; T addressof_declval() BOOST_NOEXCEPT;
template<class> template<class>
struct addressof_void { struct addressof_void {
@ -262,4 +261,14 @@ addressof(T& o) BOOST_NOEXCEPT
} /* boost */ } /* boost */
#endif #endif
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
!defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
namespace boost {
template<class T>
const T* addressof(const T&&) = delete;
} /* boost */
#endif
#endif #endif

View file

@ -21,7 +21,7 @@
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#include <boost/config.hpp> #include <boost/config.hpp>
#include <boost/detail/workaround.hpp> #include <boost/config/workaround.hpp>
#if !(defined BOOST_NO_EXCEPTIONS) #if !(defined BOOST_NO_EXCEPTIONS)
# define BOOST_TRY { try # define BOOST_TRY { try

View file

@ -8,8 +8,8 @@
#endif #endif
#include <boost/config.hpp> #include <boost/config.hpp>
#include <boost/utility/addressof.hpp> #include <boost/config/workaround.hpp>
#include <boost/detail/workaround.hpp> #include <boost/core/addressof.hpp>
// //
// ref.hpp - ref/cref, useful helper functions // ref.hpp - ref/cref, useful helper functions

View file

@ -367,14 +367,11 @@ namespace boost
#include <stddef.h> #include <stddef.h>
#endif #endif
// PGI seems to not support intptr_t/uintptr_t properly. BOOST_HAS_STDINT_H is not defined for this compiler by Boost.Config.
#if !defined(__PGIC__)
#if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \ #if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \
|| (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \ || (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \
|| defined(__CYGWIN__) \ || defined(__CYGWIN__) || defined(__VXWORKS__) \
|| defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \ || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
|| defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(sun) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || (defined(sun) && !defined(BOOST_HAS_STDINT_H)) || defined(INTPTR_MAX)
namespace boost { namespace boost {
using ::intptr_t; using ::intptr_t;
@ -393,8 +390,6 @@ namespace boost {
#endif #endif
#endif // !defined(__PGIC__)
#endif // BOOST_CSTDINT_HPP #endif // BOOST_CSTDINT_HPP
@ -422,6 +417,20 @@ INT#_C macros if they're not already defined (John Maddock).
#if defined(__GNUC__) && (__GNUC__ >= 4) #if defined(__GNUC__) && (__GNUC__ >= 4)
#pragma GCC system_header #pragma GCC system_header
#endif #endif
//
// Undef the macros as a precaution, since we may get here if <stdint.h> has failed
// to define them all, see https://svn.boost.org/trac/boost/ticket/12786
//
#undef INT8_C
#undef INT16_C
#undef INT32_C
#undef INT64_C
#undef INTMAX_C
#undef UINT8_C
#undef UINT16_C
#undef UINT32_C
#undef UINT64_C
#undef UINTMAX_C
#include <limits.h> #include <limits.h>
# define BOOST__STDC_CONSTANT_MACROS_DEFINED # define BOOST__STDC_CONSTANT_MACROS_DEFINED

View file

@ -0,0 +1,157 @@
// Copyright 2005-2011 Daniel James.
// 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)
// Note: if you change this include guard, you also need to change
// container_fwd_compile_fail.cpp
#if !defined(BOOST_DETAIL_CONTAINER_FWD_HPP)
#define BOOST_DETAIL_CONTAINER_FWD_HPP
#if defined(_MSC_VER) && \
!defined(BOOST_DETAIL_TEST_CONFIG_ONLY)
# pragma once
#endif
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
////////////////////////////////////////////////////////////////////////////////
// //
// Define BOOST_DETAIL_NO_CONTAINER_FWD if you don't want this header to //
// forward declare standard containers. //
// //
// BOOST_DETAIL_CONTAINER_FWD to make it foward declare containers even if it //
// normally doesn't. //
// //
// BOOST_DETAIL_NO_CONTAINER_FWD overrides BOOST_DETAIL_CONTAINER_FWD. //
// //
////////////////////////////////////////////////////////////////////////////////
#if !defined(BOOST_DETAIL_NO_CONTAINER_FWD)
# if defined(BOOST_DETAIL_CONTAINER_FWD)
// Force forward declarations.
# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
// STLport
# define BOOST_DETAIL_NO_CONTAINER_FWD
# elif defined(__LIBCOMO__)
// Comeau STL:
# define BOOST_DETAIL_NO_CONTAINER_FWD
# elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
// Rogue Wave library:
# define BOOST_DETAIL_NO_CONTAINER_FWD
# elif defined(_LIBCPP_VERSION)
// libc++
# define BOOST_DETAIL_NO_CONTAINER_FWD
# elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
// GNU libstdc++ 3
//
// Disable forwarding for all recent versions, as the library has a
// versioned namespace mode, and I don't know how to detect it.
# if __GLIBCXX__ >= 20070513 \
|| defined(_GLIBCXX_DEBUG) \
|| defined(_GLIBCXX_PARALLEL) \
|| defined(_GLIBCXX_PROFILE)
# define BOOST_DETAIL_NO_CONTAINER_FWD
# else
# if defined(__GLIBCXX__) && __GLIBCXX__ >= 20040530
# define BOOST_CONTAINER_FWD_COMPLEX_STRUCT
# endif
# endif
# elif defined(__STL_CONFIG_H)
// generic SGI STL
//
// Forward declaration seems to be okay, but it has a couple of odd
// implementations.
# define BOOST_CONTAINER_FWD_BAD_BITSET
# if !defined(__STL_NON_TYPE_TMPL_PARAM_BUG)
# define BOOST_CONTAINER_FWD_BAD_DEQUE
# endif
# elif defined(__MSL_CPP__)
// MSL standard lib:
# define BOOST_DETAIL_NO_CONTAINER_FWD
# elif defined(__IBMCPP__)
// The default VACPP std lib, forward declaration seems to be fine.
# elif defined(MSIPL_COMPILE_H)
// Modena C++ standard library
# define BOOST_DETAIL_NO_CONTAINER_FWD
# elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
// Dinkumware Library (this has to appear after any possible replacement
// libraries)
# else
# define BOOST_DETAIL_NO_CONTAINER_FWD
# endif
#endif
#if !defined(BOOST_DETAIL_TEST_CONFIG_ONLY)
#if defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \
!defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)
#include <deque>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <complex>
#else
#include <cstddef>
#if defined(BOOST_CONTAINER_FWD_BAD_DEQUE)
#include <deque>
#endif
#if defined(BOOST_CONTAINER_FWD_BAD_BITSET)
#include <bitset>
#endif
#if defined(BOOST_MSVC)
#pragma warning(push)
#pragma warning(disable:4099) // struct/class mismatch in fwd declarations
#endif
namespace std
{
template <class T> class allocator;
template <class charT, class traits, class Allocator> class basic_string;
template <class charT> struct char_traits;
#if defined(BOOST_CONTAINER_FWD_COMPLEX_STRUCT)
template <class T> struct complex;
#else
template <class T> class complex;
#endif
#if !defined(BOOST_CONTAINER_FWD_BAD_DEQUE)
template <class T, class Allocator> class deque;
#endif
template <class T, class Allocator> class list;
template <class T, class Allocator> class vector;
template <class Key, class T, class Compare, class Allocator> class map;
template <class Key, class T, class Compare, class Allocator>
class multimap;
template <class Key, class Compare, class Allocator> class set;
template <class Key, class Compare, class Allocator> class multiset;
#if !defined(BOOST_CONTAINER_FWD_BAD_BITSET)
template <size_t N> class bitset;
#endif
template <class T1, class T2> struct pair;
}
#if defined(BOOST_MSVC)
#pragma warning(pop)
#endif
#endif // BOOST_DETAIL_NO_CONTAINER_FWD &&
// !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)
#endif // BOOST_DETAIL_TEST_CONFIG_ONLY
#endif

View file

@ -3,270 +3,8 @@
// accompanying file LICENSE_1_0.txt or copy at // accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
#ifndef WORKAROUND_DWA2002126_HPP #ifndef WORKAROUND_DWA2002126_HPP
# define WORKAROUND_DWA2002126_HPP #define WORKAROUND_DWA2002126_HPP
// Compiler/library version workaround macro #include <boost/config/workaround.hpp>
//
// Usage:
//
// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
// // workaround for eVC4 and VC6
// ... // workaround code here
// #endif
//
// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the
// first argument must be undefined or expand to a numeric
// value. The above expands to:
//
// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300
//
// When used for workarounds that apply to the latest known version
// and all earlier versions of a compiler, the following convention
// should be observed:
//
// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301))
//
// The version number in this case corresponds to the last version in
// which the workaround was known to have been required. When
// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro
// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates
// the workaround for any version of the compiler. When
// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or
// error will be issued if the compiler version exceeds the argument
// to BOOST_TESTED_AT(). This can be used to locate workarounds which
// may be obsoleted by newer versions.
# ifndef BOOST_STRICT_CONFIG
#include <boost/config.hpp>
#ifndef __BORLANDC__
#define __BORLANDC___WORKAROUND_GUARD 1
#else
#define __BORLANDC___WORKAROUND_GUARD 0
#endif
#ifndef __CODEGEARC__
#define __CODEGEARC___WORKAROUND_GUARD 1
#else
#define __CODEGEARC___WORKAROUND_GUARD 0
#endif
#ifndef _MSC_VER
#define _MSC_VER_WORKAROUND_GUARD 1
#else
#define _MSC_VER_WORKAROUND_GUARD 0
#endif
#ifndef _MSC_FULL_VER
#define _MSC_FULL_VER_WORKAROUND_GUARD 1
#else
#define _MSC_FULL_VER_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_MSVC
#define BOOST_MSVC_WORKAROUND_GUARD 1
#else
#define BOOST_MSVC_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_MSVC_FULL_VER
#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1
#else
#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0
#endif
#ifndef __GNUC__
#define __GNUC___WORKAROUND_GUARD 1
#else
#define __GNUC___WORKAROUND_GUARD 0
#endif
#ifndef __GNUC_MINOR__
#define __GNUC_MINOR___WORKAROUND_GUARD 1
#else
#define __GNUC_MINOR___WORKAROUND_GUARD 0
#endif
#ifndef __GNUC_PATCHLEVEL__
#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1
#else
#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0
#endif
#ifndef BOOST_GCC
#define BOOST_GCC_WORKAROUND_GUARD 1
#else
#define BOOST_GCC_WORKAROUND_GUARD 0
#endif
#ifndef __IBMCPP__
#define __IBMCPP___WORKAROUND_GUARD 1
#else
#define __IBMCPP___WORKAROUND_GUARD 0
#endif
#ifndef __SUNPRO_CC
#define __SUNPRO_CC_WORKAROUND_GUARD 1
#else
#define __SUNPRO_CC_WORKAROUND_GUARD 0
#endif
#ifndef __DECCXX_VER
#define __DECCXX_VER_WORKAROUND_GUARD 1
#else
#define __DECCXX_VER_WORKAROUND_GUARD 0
#endif
#ifndef __MWERKS__
#define __MWERKS___WORKAROUND_GUARD 1
#else
#define __MWERKS___WORKAROUND_GUARD 0
#endif
#ifndef __EDG__
#define __EDG___WORKAROUND_GUARD 1
#else
#define __EDG___WORKAROUND_GUARD 0
#endif
#ifndef __EDG_VERSION__
#define __EDG_VERSION___WORKAROUND_GUARD 1
#else
#define __EDG_VERSION___WORKAROUND_GUARD 0
#endif
#ifndef __HP_aCC
#define __HP_aCC_WORKAROUND_GUARD 1
#else
#define __HP_aCC_WORKAROUND_GUARD 0
#endif
#ifndef __hpxstd98
#define __hpxstd98_WORKAROUND_GUARD 1
#else
#define __hpxstd98_WORKAROUND_GUARD 0
#endif
#ifndef _CRAYC
#define _CRAYC_WORKAROUND_GUARD 1
#else
#define _CRAYC_WORKAROUND_GUARD 0
#endif
#ifndef __DMC__
#define __DMC___WORKAROUND_GUARD 1
#else
#define __DMC___WORKAROUND_GUARD 0
#endif
#ifndef MPW_CPLUS
#define MPW_CPLUS_WORKAROUND_GUARD 1
#else
#define MPW_CPLUS_WORKAROUND_GUARD 0
#endif
#ifndef __COMO__
#define __COMO___WORKAROUND_GUARD 1
#else
#define __COMO___WORKAROUND_GUARD 0
#endif
#ifndef __COMO_VERSION__
#define __COMO_VERSION___WORKAROUND_GUARD 1
#else
#define __COMO_VERSION___WORKAROUND_GUARD 0
#endif
#ifndef __INTEL_COMPILER
#define __INTEL_COMPILER_WORKAROUND_GUARD 1
#else
#define __INTEL_COMPILER_WORKAROUND_GUARD 0
#endif
#ifndef __ICL
#define __ICL_WORKAROUND_GUARD 1
#else
#define __ICL_WORKAROUND_GUARD 0
#endif
#ifndef _COMPILER_VERSION
#define _COMPILER_VERSION_WORKAROUND_GUARD 1
#else
#define _COMPILER_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef _RWSTD_VER
#define _RWSTD_VER_WORKAROUND_GUARD 1
#else
#define _RWSTD_VER_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_RWSTD_VER
#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1
#else
#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0
#endif
#ifndef __GLIBCPP__
#define __GLIBCPP___WORKAROUND_GUARD 1
#else
#define __GLIBCPP___WORKAROUND_GUARD 0
#endif
#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1
#else
#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0
#endif
#ifndef __SGI_STL_PORT
#define __SGI_STL_PORT_WORKAROUND_GUARD 1
#else
#define __SGI_STL_PORT_WORKAROUND_GUARD 0
#endif
#ifndef _STLPORT_VERSION
#define _STLPORT_VERSION_WORKAROUND_GUARD 1
#else
#define _STLPORT_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef __LIBCOMO_VERSION__
#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1
#else
#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0
#endif
#ifndef _CPPLIB_VER
#define _CPPLIB_VER_WORKAROUND_GUARD 1
#else
#define _CPPLIB_VER_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_INTEL_CXX_VERSION
#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1
#else
#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_INTEL_WIN
#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1
#else
#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_DINKUMWARE_STDLIB
#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1
#else
#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_INTEL
#define BOOST_INTEL_WORKAROUND_GUARD 1
#else
#define BOOST_INTEL_WORKAROUND_GUARD 0
#endif
// Always define to zero, if it's used it'll be defined my MPL:
#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0
# define BOOST_WORKAROUND(symbol, test) \
((symbol ## _WORKAROUND_GUARD + 0 == 0) && \
(symbol != 0) && (1 % (( (symbol test) ) + 1)))
// ^ ^ ^ ^
// The extra level of parenthesis nesting above, along with the
// BOOST_OPEN_PAREN indirection below, is required to satisfy the
// broken preprocessor in MWCW 8.3 and earlier.
//
// The basic mechanism works as follows:
// (symbol test) + 1 => if (symbol test) then 2 else 1
// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0
//
// The complication with % is for cooperation with BOOST_TESTED_AT().
// When "test" is BOOST_TESTED_AT(x) and
// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined,
//
// symbol test => if (symbol <= x) then 1 else -1
// (symbol test) + 1 => if (symbol <= x) then 2 else 0
// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero
//
# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS
# define BOOST_OPEN_PAREN (
# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1
# else
# define BOOST_TESTED_AT(value) != ((value)-(value))
# endif
# else
# define BOOST_WORKAROUND(symbol, test) 0
# endif
#endif // WORKAROUND_DWA2002126_HPP #endif // WORKAROUND_DWA2002126_HPP

View file

@ -0,0 +1,7 @@
// Copyright 2005-2009 Daniel James.
// 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)
#include <boost/functional/hash/hash.hpp>

View file

@ -0,0 +1,336 @@
// Copyright 2005-2009 Daniel James.
// 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)
#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP)
#define BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP
#include <boost/config.hpp>
#if defined(BOOST_HAS_PRAGMA_ONCE)
#pragma once
#endif
#include <boost/config/no_tr1/cmath.hpp>
// Set BOOST_HASH_CONFORMANT_FLOATS to 1 for libraries known to have
// sufficiently good floating point support to not require any
// workarounds.
//
// When set to 0, the library tries to automatically
// use the best available implementation. This normally works well, but
// breaks when ambiguities are created by odd namespacing of the functions.
//
// Note that if this is set to 0, the library should still take full
// advantage of the platform's floating point support.
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
# define BOOST_HASH_CONFORMANT_FLOATS 0
#elif defined(__LIBCOMO__)
# define BOOST_HASH_CONFORMANT_FLOATS 0
#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
// Rogue Wave library:
# define BOOST_HASH_CONFORMANT_FLOATS 0
#elif defined(_LIBCPP_VERSION)
// libc++
# define BOOST_HASH_CONFORMANT_FLOATS 1
#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
// GNU libstdc++ 3
# if defined(__GNUC__) && __GNUC__ >= 4
# define BOOST_HASH_CONFORMANT_FLOATS 1
# else
# define BOOST_HASH_CONFORMANT_FLOATS 0
# endif
#elif defined(__STL_CONFIG_H)
// generic SGI STL
# define BOOST_HASH_CONFORMANT_FLOATS 0
#elif defined(__MSL_CPP__)
// MSL standard lib:
# define BOOST_HASH_CONFORMANT_FLOATS 0
#elif defined(__IBMCPP__)
// VACPP std lib (probably conformant for much earlier version).
# if __IBMCPP__ >= 1210
# define BOOST_HASH_CONFORMANT_FLOATS 1
# else
# define BOOST_HASH_CONFORMANT_FLOATS 0
# endif
#elif defined(MSIPL_COMPILE_H)
// Modena C++ standard library
# define BOOST_HASH_CONFORMANT_FLOATS 0
#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
// Dinkumware Library (this has to appear after any possible replacement libraries):
# if _CPPLIB_VER >= 405
# define BOOST_HASH_CONFORMANT_FLOATS 1
# else
# define BOOST_HASH_CONFORMANT_FLOATS 0
# endif
#else
# define BOOST_HASH_CONFORMANT_FLOATS 0
#endif
#if BOOST_HASH_CONFORMANT_FLOATS
// The standard library is known to be compliant, so don't use the
// configuration mechanism.
namespace boost {
namespace hash_detail {
template <typename Float>
struct call_ldexp {
typedef Float float_type;
inline Float operator()(Float x, int y) const {
return std::ldexp(x, y);
}
};
template <typename Float>
struct call_frexp {
typedef Float float_type;
inline Float operator()(Float x, int* y) const {
return std::frexp(x, y);
}
};
template <typename Float>
struct select_hash_type
{
typedef Float type;
};
}
}
#else // BOOST_HASH_CONFORMANT_FLOATS == 0
// The C++ standard requires that the C float functions are overloarded
// for float, double and long double in the std namespace, but some of the older
// library implementations don't support this. On some that don't, the C99
// float functions (frexpf, frexpl, etc.) are available.
//
// The following tries to automatically detect which are available.
namespace boost {
namespace hash_detail {
// Returned by dummy versions of the float functions.
struct not_found {
// Implicitly convertible to float and long double in order to avoid
// a compile error when the dummy float functions are used.
inline operator float() const { return 0; }
inline operator long double() const { return 0; }
};
// A type for detecting the return type of functions.
template <typename T> struct is;
template <> struct is<float> { char x[10]; };
template <> struct is<double> { char x[20]; };
template <> struct is<long double> { char x[30]; };
template <> struct is<boost::hash_detail::not_found> { char x[40]; };
// Used to convert the return type of a function to a type for sizeof.
template <typename T> is<T> float_type(T);
// call_ldexp
//
// This will get specialized for float and long double
template <typename Float> struct call_ldexp
{
typedef double float_type;
inline double operator()(double a, int b) const
{
using namespace std;
return ldexp(a, b);
}
};
// call_frexp
//
// This will get specialized for float and long double
template <typename Float> struct call_frexp
{
typedef double float_type;
inline double operator()(double a, int* b) const
{
using namespace std;
return frexp(a, b);
}
};
}
}
// A namespace for dummy functions to detect when the actual function we want
// isn't available. ldexpl, ldexpf etc. might be added tby the macros below.
//
// AFAICT these have to be outside of the boost namespace, as if they're in
// the boost namespace they'll always be preferable to any other function
// (since the arguments are built in types, ADL can't be used).
namespace boost_hash_detect_float_functions {
template <class Float> boost::hash_detail::not_found ldexp(Float, int);
template <class Float> boost::hash_detail::not_found frexp(Float, int*);
}
// Macros for generating specializations of call_ldexp and call_frexp.
//
// check_cpp and check_c99 check if the C++ or C99 functions are available.
//
// Then the call_* functions select an appropriate implementation.
//
// I used c99_func in a few places just to get a unique name.
//
// Important: when using 'using namespace' at namespace level, include as
// little as possible in that namespace, as Visual C++ has an odd bug which
// can cause the namespace to be imported at the global level. This seems to
// happen mainly when there's a template in the same namesapce.
#define BOOST_HASH_CALL_FLOAT_FUNC(cpp_func, c99_func, type1, type2) \
namespace boost_hash_detect_float_functions { \
template <class Float> \
boost::hash_detail::not_found c99_func(Float, type2); \
} \
\
namespace boost { \
namespace hash_detail { \
namespace c99_func##_detect { \
using namespace std; \
using namespace boost_hash_detect_float_functions; \
\
struct check { \
static type1 x; \
static type2 y; \
BOOST_STATIC_CONSTANT(bool, cpp = \
sizeof(float_type(cpp_func(x,y))) \
== sizeof(is<type1>)); \
BOOST_STATIC_CONSTANT(bool, c99 = \
sizeof(float_type(c99_func(x,y))) \
== sizeof(is<type1>)); \
}; \
} \
\
template <bool x> \
struct call_c99_##c99_func : \
boost::hash_detail::call_##cpp_func<double> {}; \
\
template <> \
struct call_c99_##c99_func<true> { \
typedef type1 float_type; \
\
template <typename T> \
inline type1 operator()(type1 a, T b) const \
{ \
using namespace std; \
return c99_func(a, b); \
} \
}; \
\
template <bool x> \
struct call_cpp_##c99_func : \
call_c99_##c99_func< \
::boost::hash_detail::c99_func##_detect::check::c99 \
> {}; \
\
template <> \
struct call_cpp_##c99_func<true> { \
typedef type1 float_type; \
\
template <typename T> \
inline type1 operator()(type1 a, T b) const \
{ \
using namespace std; \
return cpp_func(a, b); \
} \
}; \
\
template <> \
struct call_##cpp_func<type1> : \
call_cpp_##c99_func< \
::boost::hash_detail::c99_func##_detect::check::cpp \
> {}; \
} \
}
#define BOOST_HASH_CALL_FLOAT_MACRO(cpp_func, c99_func, type1, type2) \
namespace boost { \
namespace hash_detail { \
\
template <> \
struct call_##cpp_func<type1> { \
typedef type1 float_type; \
inline type1 operator()(type1 x, type2 y) const { \
return c99_func(x, y); \
} \
}; \
} \
}
#if defined(ldexpf)
BOOST_HASH_CALL_FLOAT_MACRO(ldexp, ldexpf, float, int)
#else
BOOST_HASH_CALL_FLOAT_FUNC(ldexp, ldexpf, float, int)
#endif
#if defined(ldexpl)
BOOST_HASH_CALL_FLOAT_MACRO(ldexp, ldexpl, long double, int)
#else
BOOST_HASH_CALL_FLOAT_FUNC(ldexp, ldexpl, long double, int)
#endif
#if defined(frexpf)
BOOST_HASH_CALL_FLOAT_MACRO(frexp, frexpf, float, int*)
#else
BOOST_HASH_CALL_FLOAT_FUNC(frexp, frexpf, float, int*)
#endif
#if defined(frexpl)
BOOST_HASH_CALL_FLOAT_MACRO(frexp, frexpl, long double, int*)
#else
BOOST_HASH_CALL_FLOAT_FUNC(frexp, frexpl, long double, int*)
#endif
#undef BOOST_HASH_CALL_FLOAT_MACRO
#undef BOOST_HASH_CALL_FLOAT_FUNC
namespace boost
{
namespace hash_detail
{
template <typename Float1, typename Float2>
struct select_hash_type_impl {
typedef double type;
};
template <>
struct select_hash_type_impl<float, float> {
typedef float type;
};
template <>
struct select_hash_type_impl<long double, long double> {
typedef long double type;
};
// select_hash_type
//
// If there is support for a particular floating point type, use that
// otherwise use double (there's always support for double).
template <typename Float>
struct select_hash_type : select_hash_type_impl<
BOOST_DEDUCED_TYPENAME call_ldexp<Float>::float_type,
BOOST_DEDUCED_TYPENAME call_frexp<Float>::float_type
> {};
}
}
#endif // BOOST_HASH_CONFORMANT_FLOATS
#endif

View file

@ -0,0 +1,271 @@
// Copyright 2005-2012 Daniel James.
// 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)
#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER)
#define BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER
#include <boost/config.hpp>
#if defined(BOOST_HAS_PRAGMA_ONCE)
#pragma once
#endif
#include <boost/functional/hash/detail/float_functions.hpp>
#include <boost/functional/hash/detail/limits.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/integer/static_log2.hpp>
#include <boost/cstdint.hpp>
#include <boost/assert.hpp>
#include <boost/limits.hpp>
#include <cstring>
#if defined(BOOST_MSVC)
#pragma warning(push)
#if BOOST_MSVC >= 1400
#pragma warning(disable:6294) // Ill-defined for-loop: initial condition does
// not satisfy test. Loop body not executed
#endif
#endif
// Can we use fpclassify?
// STLport
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
#define BOOST_HASH_USE_FPCLASSIFY 0
// GNU libstdc++ 3
#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
# if (defined(__USE_ISOC99) || defined(_GLIBCXX_USE_C99_MATH)) && \
!(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
# define BOOST_HASH_USE_FPCLASSIFY 1
# else
# define BOOST_HASH_USE_FPCLASSIFY 0
# endif
// Everything else
#else
# define BOOST_HASH_USE_FPCLASSIFY 0
#endif
namespace boost
{
namespace hash_detail
{
inline void hash_float_combine(std::size_t& seed, std::size_t value)
{
seed ^= value + (seed<<6) + (seed>>2);
}
////////////////////////////////////////////////////////////////////////
// Binary hash function
//
// Only used for floats with known iec559 floats, and certain values in
// numeric_limits
inline std::size_t hash_binary(char* ptr, std::size_t length)
{
std::size_t seed = 0;
if (length >= sizeof(std::size_t)) {
std::memcpy(&seed, ptr, sizeof(std::size_t));
length -= sizeof(std::size_t);
ptr += sizeof(std::size_t);
while(length >= sizeof(std::size_t)) {
std::size_t buffer = 0;
std::memcpy(&buffer, ptr, sizeof(std::size_t));
hash_float_combine(seed, buffer);
length -= sizeof(std::size_t);
ptr += sizeof(std::size_t);
}
}
if (length > 0) {
std::size_t buffer = 0;
std::memcpy(&buffer, ptr, length);
hash_float_combine(seed, buffer);
}
return seed;
}
template <typename Float, unsigned digits, unsigned max_exponent>
struct enable_binary_hash
{
BOOST_STATIC_CONSTANT(bool, value =
std::numeric_limits<Float>::is_iec559 &&
std::numeric_limits<Float>::digits == digits &&
std::numeric_limits<Float>::radix == 2 &&
std::numeric_limits<Float>::max_exponent == max_exponent);
};
template <typename Float>
inline std::size_t float_hash_impl(Float v,
BOOST_DEDUCED_TYPENAME boost::enable_if_c<
enable_binary_hash<Float, 24, 128>::value,
std::size_t>::type)
{
return hash_binary((char*) &v, 4);
}
template <typename Float>
inline std::size_t float_hash_impl(Float v,
BOOST_DEDUCED_TYPENAME boost::enable_if_c<
enable_binary_hash<Float, 53, 1024>::value,
std::size_t>::type)
{
return hash_binary((char*) &v, 8);
}
template <typename Float>
inline std::size_t float_hash_impl(Float v,
BOOST_DEDUCED_TYPENAME boost::enable_if_c<
enable_binary_hash<Float, 64, 16384>::value,
std::size_t>::type)
{
return hash_binary((char*) &v, 10);
}
template <typename Float>
inline std::size_t float_hash_impl(Float v,
BOOST_DEDUCED_TYPENAME boost::enable_if_c<
enable_binary_hash<Float, 113, 16384>::value,
std::size_t>::type)
{
return hash_binary((char*) &v, 16);
}
////////////////////////////////////////////////////////////////////////
// Portable hash function
//
// Used as a fallback when the binary hash function isn't supported.
template <class T>
inline std::size_t float_hash_impl2(T v)
{
boost::hash_detail::call_frexp<T> frexp;
boost::hash_detail::call_ldexp<T> ldexp;
int exp = 0;
v = frexp(v, &exp);
// A postive value is easier to hash, so combine the
// sign with the exponent and use the absolute value.
if(v < 0) {
v = -v;
exp += limits<T>::max_exponent -
limits<T>::min_exponent;
}
v = ldexp(v, limits<std::size_t>::digits);
std::size_t seed = static_cast<std::size_t>(v);
v -= static_cast<T>(seed);
// ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1;
std::size_t const length
= (limits<T>::digits *
boost::static_log2<limits<T>::radix>::value
+ limits<std::size_t>::digits - 1)
/ limits<std::size_t>::digits;
for(std::size_t i = 0; i != length; ++i)
{
v = ldexp(v, limits<std::size_t>::digits);
std::size_t part = static_cast<std::size_t>(v);
v -= static_cast<T>(part);
hash_float_combine(seed, part);
}
hash_float_combine(seed, static_cast<std::size_t>(exp));
return seed;
}
#if !defined(BOOST_HASH_DETAIL_TEST_WITHOUT_GENERIC)
template <class T>
inline std::size_t float_hash_impl(T v, ...)
{
typedef BOOST_DEDUCED_TYPENAME select_hash_type<T>::type type;
return float_hash_impl2(static_cast<type>(v));
}
#endif
}
}
#if BOOST_HASH_USE_FPCLASSIFY
#include <boost/config/no_tr1/cmath.hpp>
namespace boost
{
namespace hash_detail
{
template <class T>
inline std::size_t float_hash_value(T v)
{
#if defined(fpclassify)
switch (fpclassify(v))
#elif BOOST_HASH_CONFORMANT_FLOATS
switch (std::fpclassify(v))
#else
using namespace std;
switch (fpclassify(v))
#endif
{
case FP_ZERO:
return 0;
case FP_INFINITE:
return (std::size_t)(v > 0 ? -1 : -2);
case FP_NAN:
return (std::size_t)(-3);
case FP_NORMAL:
case FP_SUBNORMAL:
return float_hash_impl(v, 0);
default:
BOOST_ASSERT(0);
return 0;
}
}
}
}
#else // !BOOST_HASH_USE_FPCLASSIFY
namespace boost
{
namespace hash_detail
{
template <class T>
inline bool is_zero(T v)
{
#if !defined(__GNUC__) && !defined(__clang__)
return v == 0;
#else
// GCC's '-Wfloat-equal' will complain about comparing
// v to 0, but because it disables warnings for system
// headers it won't complain if you use std::equal_to to
// compare with 0. Resulting in this silliness:
return std::equal_to<T>()(v, 0);
#endif
}
template <class T>
inline std::size_t float_hash_value(T v)
{
return boost::hash_detail::is_zero(v) ? 0 : float_hash_impl(v, 0);
}
}
}
#endif // BOOST_HASH_USE_FPCLASSIFY
#undef BOOST_HASH_USE_FPCLASSIFY
#if defined(BOOST_MSVC)
#pragma warning(pop)
#endif
#endif

View file

@ -0,0 +1,62 @@
// Copyright 2005-2009 Daniel James.
// 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)
//
// On some platforms std::limits gives incorrect values for long double.
// This tries to work around them.
#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER)
#define BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER
#include <boost/config.hpp>
#if defined(BOOST_HAS_PRAGMA_ONCE)
#pragma once
#endif
#include <boost/limits.hpp>
// On OpenBSD, numeric_limits is not reliable for long doubles, but
// the macros defined in <float.h> are and support long double when STLport
// doesn't.
#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE)
#include <float.h>
#endif
namespace boost
{
namespace hash_detail
{
template <class T>
struct limits : std::numeric_limits<T> {};
#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE)
template <>
struct limits<long double>
: std::numeric_limits<long double>
{
static long double epsilon() {
return LDBL_EPSILON;
}
static long double (max)() {
return LDBL_MAX;
}
static long double (min)() {
return LDBL_MIN;
}
BOOST_STATIC_CONSTANT(int, digits = LDBL_MANT_DIG);
BOOST_STATIC_CONSTANT(int, max_exponent = LDBL_MAX_EXP);
BOOST_STATIC_CONSTANT(int, min_exponent = LDBL_MIN_EXP);
#if defined(_STLP_NO_LONG_DOUBLE)
BOOST_STATIC_CONSTANT(int, radix = FLT_RADIX);
#endif
};
#endif // __OpenBSD__
}
}
#endif

View file

@ -0,0 +1,318 @@
// Copyright 2005-2009 Daniel James.
// 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)
// Based on Peter Dimov's proposal
// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
// issue 6.18.
// This implements the extensions to the standard.
// It's undocumented, so you shouldn't use it....
#if !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP)
#define BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP
#include <boost/config.hpp>
#if defined(BOOST_HAS_PRAGMA_ONCE)
#pragma once
#endif
#include <boost/functional/hash/hash.hpp>
#include <boost/detail/container_fwd.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/static_assert.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#if !defined(BOOST_NO_CXX11_HDR_ARRAY)
# include <array>
#endif
#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
# include <tuple>
#endif
#if !defined(BOOST_NO_CXX11_HDR_MEMORY)
# include <memory>
#endif
#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
#include <boost/type_traits/is_array.hpp>
#endif
namespace boost
{
template <class A, class B>
std::size_t hash_value(std::pair<A, B> const&);
template <class T, class A>
std::size_t hash_value(std::vector<T, A> const&);
template <class T, class A>
std::size_t hash_value(std::list<T, A> const& v);
template <class T, class A>
std::size_t hash_value(std::deque<T, A> const& v);
template <class K, class C, class A>
std::size_t hash_value(std::set<K, C, A> const& v);
template <class K, class C, class A>
std::size_t hash_value(std::multiset<K, C, A> const& v);
template <class K, class T, class C, class A>
std::size_t hash_value(std::map<K, T, C, A> const& v);
template <class K, class T, class C, class A>
std::size_t hash_value(std::multimap<K, T, C, A> const& v);
template <class T>
std::size_t hash_value(std::complex<T> const&);
template <class A, class B>
std::size_t hash_value(std::pair<A, B> const& v)
{
std::size_t seed = 0;
boost::hash_combine(seed, v.first);
boost::hash_combine(seed, v.second);
return seed;
}
template <class T, class A>
std::size_t hash_value(std::vector<T, A> const& v)
{
return boost::hash_range(v.begin(), v.end());
}
template <class T, class A>
std::size_t hash_value(std::list<T, A> const& v)
{
return boost::hash_range(v.begin(), v.end());
}
template <class T, class A>
std::size_t hash_value(std::deque<T, A> const& v)
{
return boost::hash_range(v.begin(), v.end());
}
template <class K, class C, class A>
std::size_t hash_value(std::set<K, C, A> const& v)
{
return boost::hash_range(v.begin(), v.end());
}
template <class K, class C, class A>
std::size_t hash_value(std::multiset<K, C, A> const& v)
{
return boost::hash_range(v.begin(), v.end());
}
template <class K, class T, class C, class A>
std::size_t hash_value(std::map<K, T, C, A> const& v)
{
return boost::hash_range(v.begin(), v.end());
}
template <class K, class T, class C, class A>
std::size_t hash_value(std::multimap<K, T, C, A> const& v)
{
return boost::hash_range(v.begin(), v.end());
}
template <class T>
std::size_t hash_value(std::complex<T> const& v)
{
boost::hash<T> hasher;
std::size_t seed = hasher(v.imag());
seed ^= hasher(v.real()) + (seed<<6) + (seed>>2);
return seed;
}
#if !defined(BOOST_NO_CXX11_HDR_ARRAY)
template <class T, std::size_t N>
std::size_t hash_value(std::array<T, N> const& v)
{
return boost::hash_range(v.begin(), v.end());
}
#endif
#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
namespace hash_detail {
template <std::size_t I, typename T>
inline typename boost::enable_if_c<(I == std::tuple_size<T>::value),
void>::type
hash_combine_tuple(std::size_t&, T const&)
{
}
template <std::size_t I, typename T>
inline typename boost::enable_if_c<(I < std::tuple_size<T>::value),
void>::type
hash_combine_tuple(std::size_t& seed, T const& v)
{
boost::hash_combine(seed, std::get<I>(v));
boost::hash_detail::hash_combine_tuple<I + 1>(seed, v);
}
template <typename T>
inline std::size_t hash_tuple(T const& v)
{
std::size_t seed = 0;
boost::hash_detail::hash_combine_tuple<0>(seed, v);
return seed;
}
}
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <typename... T>
inline std::size_t hash_value(std::tuple<T...> const& v)
{
return boost::hash_detail::hash_tuple(v);
}
#else
inline std::size_t hash_value(std::tuple<> const& v)
{
return boost::hash_detail::hash_tuple(v);
}
# define BOOST_HASH_TUPLE_F(z, n, _) \
template< \
BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \
> \
inline std::size_t hash_value(std::tuple< \
BOOST_PP_ENUM_PARAMS_Z(z, n, A) \
> const& v) \
{ \
return boost::hash_detail::hash_tuple(v); \
}
BOOST_PP_REPEAT_FROM_TO(1, 11, BOOST_HASH_TUPLE_F, _)
# undef BOOST_HASH_TUPLE_F
#endif
#endif
#if !defined(BOOST_NO_CXX11_SMART_PTR)
template <typename T>
inline std::size_t hash_value(std::shared_ptr<T> const& x) {
return boost::hash_value(x.get());
}
template <typename T, typename Deleter>
inline std::size_t hash_value(std::unique_ptr<T, Deleter> const& x) {
return boost::hash_value(x.get());
}
#endif
//
// call_hash_impl
//
// On compilers without function template ordering, this deals with arrays.
#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
namespace hash_detail
{
template <bool IsArray>
struct call_hash_impl
{
template <class T>
struct inner
{
static std::size_t call(T const& v)
{
using namespace boost;
return hash_value(v);
}
};
};
template <>
struct call_hash_impl<true>
{
template <class Array>
struct inner
{
static std::size_t call(Array const& v)
{
const int size = sizeof(v) / sizeof(*v);
return boost::hash_range(v, v + size);
}
};
};
template <class T>
struct call_hash
: public call_hash_impl<boost::is_array<T>::value>
::BOOST_NESTED_TEMPLATE inner<T>
{
};
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
//
// boost::hash
//
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template <class T> struct hash
: boost::hash_detail::hash_base<T>
{
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
std::size_t operator()(T const& val) const
{
return hash_value(val);
}
#else
std::size_t operator()(T const& val) const
{
return hash_detail::call_hash<T>::call(val);
}
#endif
};
#if BOOST_WORKAROUND(__DMC__, <= 0x848)
template <class T, unsigned int n> struct hash<T[n]>
: boost::hash_detail::hash_base<T[n]>
{
std::size_t operator()(const T* val) const
{
return boost::hash_range(val, val+n);
}
};
#endif
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// On compilers without partial specialization, boost::hash<T>
// has already been declared to deal with pointers, so just
// need to supply the non-pointer version of hash_impl.
namespace hash_detail
{
template <bool IsPointer>
struct hash_impl;
template <>
struct hash_impl<false>
{
template <class T>
struct inner
: boost::hash_detail::hash_base<T>
{
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
std::size_t operator()(T const& val) const
{
return hash_value(val);
}
#else
std::size_t operator()(T const& val) const
{
return hash_detail::call_hash<T>::call(val);
}
#endif
};
};
}
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
}
#endif

View file

@ -0,0 +1,595 @@
// Copyright 2005-2014 Daniel James.
// 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)
// Based on Peter Dimov's proposal
// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
// issue 6.18.
//
// This also contains public domain code from MurmurHash. From the
// MurmurHash header:
// MurmurHash3 was written by Austin Appleby, and is placed in the public
// domain. The author hereby disclaims copyright to this source code.
#if !defined(BOOST_FUNCTIONAL_HASH_HASH_HPP)
#define BOOST_FUNCTIONAL_HASH_HASH_HPP
#include <boost/functional/hash/hash_fwd.hpp>
#include <functional>
#include <boost/functional/hash/detail/hash_float.hpp>
#include <string>
#include <boost/limits.hpp>
#include <boost/type_traits/is_enum.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/cstdint.hpp>
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#include <boost/type_traits/is_pointer.hpp>
#endif
#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
#include <typeindex>
#endif
#if defined(BOOST_MSVC)
#pragma warning(push)
#if BOOST_MSVC >= 1400
#pragma warning(disable:6295) // Ill-defined for-loop : 'unsigned int' values
// are always of range '0' to '4294967295'.
// Loop executes infinitely.
#endif
#endif
#if BOOST_WORKAROUND(__GNUC__, < 3) \
&& !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
#define BOOST_HASH_CHAR_TRAITS string_char_traits
#else
#define BOOST_HASH_CHAR_TRAITS char_traits
#endif
#if defined(_MSC_VER)
# define BOOST_FUNCTIONAL_HASH_ROTL32(x, r) _rotl(x,r)
#else
# define BOOST_FUNCTIONAL_HASH_ROTL32(x, r) (x << r) | (x >> (32 - r))
#endif
namespace boost
{
namespace hash_detail
{
#if defined(_HAS_AUTO_PTR_ETC) && !_HAS_AUTO_PTR_ETC
template <typename T>
struct hash_base
{
typedef T argument_type;
typedef std::size_t result_type;
};
#else
template <typename T>
struct hash_base : std::unary_function<T, std::size_t> {};
#endif
struct enable_hash_value { typedef std::size_t type; };
template <typename T> struct basic_numbers {};
template <typename T> struct long_numbers;
template <typename T> struct ulong_numbers;
template <typename T> struct float_numbers {};
template <> struct basic_numbers<bool> :
boost::hash_detail::enable_hash_value {};
template <> struct basic_numbers<char> :
boost::hash_detail::enable_hash_value {};
template <> struct basic_numbers<unsigned char> :
boost::hash_detail::enable_hash_value {};
template <> struct basic_numbers<signed char> :
boost::hash_detail::enable_hash_value {};
template <> struct basic_numbers<short> :
boost::hash_detail::enable_hash_value {};
template <> struct basic_numbers<unsigned short> :
boost::hash_detail::enable_hash_value {};
template <> struct basic_numbers<int> :
boost::hash_detail::enable_hash_value {};
template <> struct basic_numbers<unsigned int> :
boost::hash_detail::enable_hash_value {};
template <> struct basic_numbers<long> :
boost::hash_detail::enable_hash_value {};
template <> struct basic_numbers<unsigned long> :
boost::hash_detail::enable_hash_value {};
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
template <> struct basic_numbers<wchar_t> :
boost::hash_detail::enable_hash_value {};
#endif
#if !defined(BOOST_NO_CXX11_CHAR16_T)
template <> struct basic_numbers<char16_t> :
boost::hash_detail::enable_hash_value {};
#endif
#if !defined(BOOST_NO_CXX11_CHAR32_T)
template <> struct basic_numbers<char32_t> :
boost::hash_detail::enable_hash_value {};
#endif
// long_numbers is defined like this to allow for separate
// specialization for long_long and int128_type, in case
// they conflict.
template <typename T> struct long_numbers2 {};
template <typename T> struct ulong_numbers2 {};
template <typename T> struct long_numbers : long_numbers2<T> {};
template <typename T> struct ulong_numbers : ulong_numbers2<T> {};
#if !defined(BOOST_NO_LONG_LONG)
template <> struct long_numbers<boost::long_long_type> :
boost::hash_detail::enable_hash_value {};
template <> struct ulong_numbers<boost::ulong_long_type> :
boost::hash_detail::enable_hash_value {};
#endif
#if defined(BOOST_HAS_INT128)
template <> struct long_numbers2<boost::int128_type> :
boost::hash_detail::enable_hash_value {};
template <> struct ulong_numbers2<boost::uint128_type> :
boost::hash_detail::enable_hash_value {};
#endif
template <> struct float_numbers<float> :
boost::hash_detail::enable_hash_value {};
template <> struct float_numbers<double> :
boost::hash_detail::enable_hash_value {};
template <> struct float_numbers<long double> :
boost::hash_detail::enable_hash_value {};
}
template <typename T>
typename boost::hash_detail::basic_numbers<T>::type hash_value(T);
template <typename T>
typename boost::hash_detail::long_numbers<T>::type hash_value(T);
template <typename T>
typename boost::hash_detail::ulong_numbers<T>::type hash_value(T);
template <typename T>
typename boost::enable_if<boost::is_enum<T>, std::size_t>::type
hash_value(T);
#if !BOOST_WORKAROUND(__DMC__, <= 0x848)
template <class T> std::size_t hash_value(T* const&);
#else
template <class T> std::size_t hash_value(T*);
#endif
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
template< class T, unsigned N >
std::size_t hash_value(const T (&x)[N]);
template< class T, unsigned N >
std::size_t hash_value(T (&x)[N]);
#endif
template <class Ch, class A>
std::size_t hash_value(
std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const&);
template <typename T>
typename boost::hash_detail::float_numbers<T>::type hash_value(T);
#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
std::size_t hash_value(std::type_index);
#endif
// Implementation
namespace hash_detail
{
template <class T>
inline std::size_t hash_value_signed(T val)
{
const unsigned int size_t_bits = std::numeric_limits<std::size_t>::digits;
// ceiling(std::numeric_limits<T>::digits / size_t_bits) - 1
const int length = (std::numeric_limits<T>::digits - 1)
/ static_cast<int>(size_t_bits);
std::size_t seed = 0;
T positive = val < 0 ? -1 - val : val;
// Hopefully, this loop can be unrolled.
for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits)
{
seed ^= (std::size_t) (positive >> i) + (seed<<6) + (seed>>2);
}
seed ^= (std::size_t) val + (seed<<6) + (seed>>2);
return seed;
}
template <class T>
inline std::size_t hash_value_unsigned(T val)
{
const unsigned int size_t_bits = std::numeric_limits<std::size_t>::digits;
// ceiling(std::numeric_limits<T>::digits / size_t_bits) - 1
const int length = (std::numeric_limits<T>::digits - 1)
/ static_cast<int>(size_t_bits);
std::size_t seed = 0;
// Hopefully, this loop can be unrolled.
for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits)
{
seed ^= (std::size_t) (val >> i) + (seed<<6) + (seed>>2);
}
seed ^= (std::size_t) val + (seed<<6) + (seed>>2);
return seed;
}
template <typename SizeT>
inline void hash_combine_impl(SizeT& seed, SizeT value)
{
seed ^= value + 0x9e3779b9 + (seed<<6) + (seed>>2);
}
inline void hash_combine_impl(boost::uint32_t& h1,
boost::uint32_t k1)
{
const uint32_t c1 = 0xcc9e2d51;
const uint32_t c2 = 0x1b873593;
k1 *= c1;
k1 = BOOST_FUNCTIONAL_HASH_ROTL32(k1,15);
k1 *= c2;
h1 ^= k1;
h1 = BOOST_FUNCTIONAL_HASH_ROTL32(h1,13);
h1 = h1*5+0xe6546b64;
}
// Don't define 64-bit hash combine on platforms without 64 bit integers,
// and also not for 32-bit gcc as it warns about the 64-bit constant.
#if !defined(BOOST_NO_INT64_T) && \
!(defined(__GNUC__) && ULONG_MAX == 0xffffffff)
inline void hash_combine_impl(boost::uint64_t& h,
boost::uint64_t k)
{
const boost::uint64_t m = UINT64_C(0xc6a4a7935bd1e995);
const int r = 47;
k *= m;
k ^= k >> r;
k *= m;
h ^= k;
h *= m;
// Completely arbitrary number, to prevent 0's
// from hashing to 0.
h += 0xe6546b64;
}
#endif // BOOST_NO_INT64_T
}
template <typename T>
typename boost::hash_detail::basic_numbers<T>::type hash_value(T v)
{
return static_cast<std::size_t>(v);
}
template <typename T>
typename boost::hash_detail::long_numbers<T>::type hash_value(T v)
{
return hash_detail::hash_value_signed(v);
}
template <typename T>
typename boost::hash_detail::ulong_numbers<T>::type hash_value(T v)
{
return hash_detail::hash_value_unsigned(v);
}
template <typename T>
typename boost::enable_if<boost::is_enum<T>, std::size_t>::type
hash_value(T v)
{
return static_cast<std::size_t>(v);
}
// Implementation by Alberto Barbati and Dave Harris.
#if !BOOST_WORKAROUND(__DMC__, <= 0x848)
template <class T> std::size_t hash_value(T* const& v)
#else
template <class T> std::size_t hash_value(T* v)
#endif
{
#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
// for some reason ptrdiff_t on OpenVMS compiler with
// 64 bit is not 64 bit !!!
std::size_t x = static_cast<std::size_t>(
reinterpret_cast<long long int>(v));
#else
std::size_t x = static_cast<std::size_t>(
reinterpret_cast<std::ptrdiff_t>(v));
#endif
return x + (x >> 3);
}
#if defined(BOOST_MSVC)
#pragma warning(push)
#if BOOST_MSVC <= 1400
#pragma warning(disable:4267) // 'argument' : conversion from 'size_t' to
// 'unsigned int', possible loss of data
// A misguided attempt to detect 64-bit
// incompatability.
#endif
#endif
template <class T>
inline void hash_combine(std::size_t& seed, T const& v)
{
boost::hash<T> hasher;
return boost::hash_detail::hash_combine_impl(seed, hasher(v));
}
#if defined(BOOST_MSVC)
#pragma warning(pop)
#endif
template <class It>
inline std::size_t hash_range(It first, It last)
{
std::size_t seed = 0;
for(; first != last; ++first)
{
hash_combine(seed, *first);
}
return seed;
}
template <class It>
inline void hash_range(std::size_t& seed, It first, It last)
{
for(; first != last; ++first)
{
hash_combine(seed, *first);
}
}
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
template <class T>
inline std::size_t hash_range(T* first, T* last)
{
std::size_t seed = 0;
for(; first != last; ++first)
{
boost::hash<T> hasher;
seed ^= hasher(*first) + 0x9e3779b9 + (seed<<6) + (seed>>2);
}
return seed;
}
template <class T>
inline void hash_range(std::size_t& seed, T* first, T* last)
{
for(; first != last; ++first)
{
boost::hash<T> hasher;
seed ^= hasher(*first) + 0x9e3779b9 + (seed<<6) + (seed>>2);
}
}
#endif
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
template< class T, unsigned N >
inline std::size_t hash_value(const T (&x)[N])
{
return hash_range(x, x + N);
}
template< class T, unsigned N >
inline std::size_t hash_value(T (&x)[N])
{
return hash_range(x, x + N);
}
#endif
template <class Ch, class A>
inline std::size_t hash_value(
std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const& v)
{
return hash_range(v.begin(), v.end());
}
template <typename T>
typename boost::hash_detail::float_numbers<T>::type hash_value(T v)
{
return boost::hash_detail::float_hash_value(v);
}
#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
inline std::size_t hash_value(std::type_index v)
{
return v.hash_code();
}
#endif
//
// boost::hash
//
// Define the specializations required by the standard. The general purpose
// boost::hash is defined later in extensions.hpp if
// BOOST_HASH_NO_EXTENSIONS is not defined.
// BOOST_HASH_SPECIALIZE - define a specialization for a type which is
// passed by copy.
//
// BOOST_HASH_SPECIALIZE_REF - define a specialization for a type which is
// passed by const reference.
//
// These are undefined later.
#define BOOST_HASH_SPECIALIZE(type) \
template <> struct hash<type> \
: public boost::hash_detail::hash_base<type> \
{ \
std::size_t operator()(type v) const \
{ \
return boost::hash_value(v); \
} \
};
#define BOOST_HASH_SPECIALIZE_REF(type) \
template <> struct hash<type> \
: public boost::hash_detail::hash_base<type> \
{ \
std::size_t operator()(type const& v) const \
{ \
return boost::hash_value(v); \
} \
};
BOOST_HASH_SPECIALIZE(bool)
BOOST_HASH_SPECIALIZE(char)
BOOST_HASH_SPECIALIZE(signed char)
BOOST_HASH_SPECIALIZE(unsigned char)
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
BOOST_HASH_SPECIALIZE(wchar_t)
#endif
#if !defined(BOOST_NO_CXX11_CHAR16_T)
BOOST_HASH_SPECIALIZE(char16_t)
#endif
#if !defined(BOOST_NO_CXX11_CHAR32_T)
BOOST_HASH_SPECIALIZE(char32_t)
#endif
BOOST_HASH_SPECIALIZE(short)
BOOST_HASH_SPECIALIZE(unsigned short)
BOOST_HASH_SPECIALIZE(int)
BOOST_HASH_SPECIALIZE(unsigned int)
BOOST_HASH_SPECIALIZE(long)
BOOST_HASH_SPECIALIZE(unsigned long)
BOOST_HASH_SPECIALIZE(float)
BOOST_HASH_SPECIALIZE(double)
BOOST_HASH_SPECIALIZE(long double)
BOOST_HASH_SPECIALIZE_REF(std::string)
#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
BOOST_HASH_SPECIALIZE_REF(std::wstring)
#endif
#if !defined(BOOST_NO_CXX11_CHAR16_T)
BOOST_HASH_SPECIALIZE_REF(std::basic_string<char16_t>)
#endif
#if !defined(BOOST_NO_CXX11_CHAR32_T)
BOOST_HASH_SPECIALIZE_REF(std::basic_string<char32_t>)
#endif
#if !defined(BOOST_NO_LONG_LONG)
BOOST_HASH_SPECIALIZE(boost::long_long_type)
BOOST_HASH_SPECIALIZE(boost::ulong_long_type)
#endif
#if defined(BOOST_HAS_INT128)
BOOST_HASH_SPECIALIZE(boost::int128_type)
BOOST_HASH_SPECIALIZE(boost::uint128_type)
#endif
#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
BOOST_HASH_SPECIALIZE(std::type_index)
#endif
#undef BOOST_HASH_SPECIALIZE
#undef BOOST_HASH_SPECIALIZE_REF
// Specializing boost::hash for pointers.
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template <class T>
struct hash<T*>
: public boost::hash_detail::hash_base<T*>
{
std::size_t operator()(T* v) const
{
#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
return boost::hash_value(v);
#else
std::size_t x = static_cast<std::size_t>(
reinterpret_cast<std::ptrdiff_t>(v));
return x + (x >> 3);
#endif
}
};
#else
// For compilers without partial specialization, we define a
// boost::hash for all remaining types. But hash_impl is only defined
// for pointers in 'extensions.hpp' - so when BOOST_HASH_NO_EXTENSIONS
// is defined there will still be a compile error for types not supported
// in the standard.
namespace hash_detail
{
template <bool IsPointer>
struct hash_impl;
template <>
struct hash_impl<true>
{
template <class T>
struct inner
: public boost::hash_detail::hash_base<T>
{
std::size_t operator()(T val) const
{
#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 590)
return boost::hash_value(val);
#else
std::size_t x = static_cast<std::size_t>(
reinterpret_cast<std::ptrdiff_t>(val));
return x + (x >> 3);
#endif
}
};
};
}
template <class T> struct hash
: public boost::hash_detail::hash_impl<boost::is_pointer<T>::value>
::BOOST_NESTED_TEMPLATE inner<T>
{
};
#endif
}
#undef BOOST_HASH_CHAR_TRAITS
#undef BOOST_FUNCTIONAL_HASH_ROTL32
#if defined(BOOST_MSVC)
#pragma warning(pop)
#endif
#endif // BOOST_FUNCTIONAL_HASH_HASH_HPP
// Include this outside of the include guards in case the file is included
// twice - once with BOOST_HASH_NO_EXTENSIONS defined, and then with it
// undefined.
#if !defined(BOOST_HASH_NO_EXTENSIONS) \
&& !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP)
#include <boost/functional/hash/extensions.hpp>
#endif

View file

@ -89,7 +89,7 @@ struct elemental;
template< class DomainT, class CodomainT, template< class DomainT, class CodomainT,
ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval > ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval >
struct elemental<std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare)const, CodomainT> > struct elemental<std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare) const, CodomainT> >
{ {
typedef std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare), CodomainT> segment_type; typedef std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare), CodomainT> segment_type;
typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;
@ -113,7 +113,7 @@ struct elemental;
}; };
template< class CodomainT, ICL_INTERVAL(ICL_COMPARE) Interval > template< class CodomainT, ICL_INTERVAL(ICL_COMPARE) Interval >
struct elemental<std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare)const, CodomainT> > struct elemental<std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare) const, CodomainT> >
{ {
typedef std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare), CodomainT> segment_type; typedef std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare), CodomainT> segment_type;
typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;
@ -161,7 +161,7 @@ struct segment_adapter<SegmentIteratorT, ICL_INTERVAL_TYPE(Interval,DomainT,Comp
template < class SegmentIteratorT, class DomainT, class CodomainT, template < class SegmentIteratorT, class DomainT, class CodomainT,
ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval > ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval >
struct segment_adapter<SegmentIteratorT, std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare)const, CodomainT> > struct segment_adapter<SegmentIteratorT, std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare) const, CodomainT> >
{ {
typedef segment_adapter type; typedef segment_adapter type;
typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;
@ -214,7 +214,7 @@ struct segment_adapter
}; };
template < class SegmentIteratorT, class CodomainT, ICL_INTERVAL(ICL_COMPARE) Interval > template < class SegmentIteratorT, class CodomainT, ICL_INTERVAL(ICL_COMPARE) Interval >
struct segment_adapter<SegmentIteratorT, std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare)const, CodomainT> > struct segment_adapter<SegmentIteratorT, std::pair<ICL_INTERVAL_TYPE(Interval,DomainT,Compare) const, CodomainT> >
{ {
typedef segment_adapter type; typedef segment_adapter type;
typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type;

View file

@ -8,7 +8,6 @@ Copyright (c) 2007-2009: Joachim Faulhaber
#ifndef BOOST_ICL_FUNCTORS_HPP_JOFA_080315 #ifndef BOOST_ICL_FUNCTORS_HPP_JOFA_080315
#define BOOST_ICL_FUNCTORS_HPP_JOFA_080315 #define BOOST_ICL_FUNCTORS_HPP_JOFA_080315
#include <functional>
#include <boost/type_traits.hpp> #include <boost/type_traits.hpp>
#include <boost/mpl/if.hpp> #include <boost/mpl/if.hpp>
#include <boost/icl/type_traits/identity_element.hpp> #include <boost/icl/type_traits/identity_element.hpp>
@ -20,15 +19,19 @@ namespace boost{namespace icl
{ {
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
template <typename Type> struct identity_based_inplace_combine template <typename Type> struct identity_based_inplace_combine
: public std::binary_function<Type&, const Type&, void>
{ {
typedef Type& first_argument_type;
typedef const Type& second_argument_type;
typedef void result_type;
inline static Type identity_element() { return boost::icl::identity_element<Type>::value(); } inline static Type identity_element() { return boost::icl::identity_element<Type>::value(); }
}; };
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
template <typename Type> struct unit_element_based_inplace_combine template <typename Type> struct unit_element_based_inplace_combine
: public std::binary_function<Type&, const Type&, void>
{ {
typedef Type& first_argument_type;
typedef const Type& second_argument_type;
typedef void result_type;
inline static Type identity_element() { return boost::icl::unit_element<Type>::value(); } inline static Type identity_element() { return boost::icl::unit_element<Type>::value(); }
}; };

View file

@ -41,8 +41,8 @@ public:
interval_bounds all ()const { return interval_bounds(_bits & _all ); } interval_bounds all ()const { return interval_bounds(_bits & _all ); }
interval_bounds left ()const { return interval_bounds(_bits & _left ); } interval_bounds left ()const { return interval_bounds(_bits & _left ); }
interval_bounds right()const { return interval_bounds(_bits & _right); } interval_bounds right()const { return interval_bounds(_bits & _right); }
interval_bounds reverse_left ()const { return interval_bounds((~_bits>>1) & _right); } interval_bounds reverse_left ()const { return interval_bounds((bound_type(~_bits)>>1) & _right); }
interval_bounds reverse_right()const { return interval_bounds((~_bits<<1) & _left ); } interval_bounds reverse_right()const { return interval_bounds((bound_type(~_bits)<<1) & _left ); }
bound_type bits()const{ return _bits; } bound_type bits()const{ return _bits; }

View file

@ -8,8 +8,6 @@ Copyright (c) 2010-2010: Joachim Faulhaber
#ifndef BOOST_ICL_TYPE_TRAITS_PREDICATE_HPP_JOFA_101102 #ifndef BOOST_ICL_TYPE_TRAITS_PREDICATE_HPP_JOFA_101102
#define BOOST_ICL_TYPE_TRAITS_PREDICATE_HPP_JOFA_101102 #define BOOST_ICL_TYPE_TRAITS_PREDICATE_HPP_JOFA_101102
#include <functional>
namespace boost{namespace icl namespace boost{namespace icl
{ {
// naming convention // naming convention
@ -20,7 +18,12 @@ namespace boost{namespace icl
// Unary predicates // Unary predicates
template <class Type> template <class Type>
class property : public std::unary_function<Type,bool>{}; class property
{
public:
typedef Type argument_type;
typedef bool result_type;
};
template <class Type> template <class Type>
class member_property : public property<Type> class member_property : public property<Type>
@ -35,7 +38,13 @@ namespace boost{namespace icl
// Binary predicates: relations // Binary predicates: relations
template <class LeftT, class RightT> template <class LeftT, class RightT>
class relation : public std::binary_function<LeftT,RightT,bool>{}; class relation
{
public:
typedef LeftT first_argument_type;
typedef RightT second_argument_type;
typedef bool result_type;
};
}} // namespace icl boost }} // namespace icl boost

View file

@ -43,7 +43,6 @@ namespace boost{ namespace icl
template<>inline std::string type_to_string<float>::apply() { return "flt"; } template<>inline std::string type_to_string<float>::apply() { return "flt"; }
template<>inline std::string type_to_string<double>::apply() { return "dbl"; } template<>inline std::string type_to_string<double>::apply() { return "dbl"; }
template<>inline std::string type_to_string<std::string>::apply() { return "string"; }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
template<template<class> class Templ> template<template<class> class Templ>
@ -78,6 +77,13 @@ namespace boost{ namespace icl
} }
}; };
// ---------------------------------------------------------------------------
template<>
struct type_to_string<std::string>
{
static std::string apply() { return "string"; }
};
}} // namespace boost icl }} // namespace boost icl
#endif #endif

View file

@ -0,0 +1,102 @@
// Boost common_factor_ct.hpp header file ----------------------------------//
// (C) Copyright Daryle Walker and Stephen Cleary 2001-2002.
// 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 for updates, documentation, and revision history.
#ifndef BOOST_INTEGER_COMMON_FACTOR_CT_HPP
#define BOOST_INTEGER_COMMON_FACTOR_CT_HPP
#include <boost/integer_fwd.hpp> // self include
#include <boost/config.hpp> // for BOOST_STATIC_CONSTANT, etc.
namespace boost
{
namespace integer
{
// Implementation details --------------------------------------------------//
namespace detail
{
// Build GCD with Euclid's recursive algorithm
template < static_gcd_type Value1, static_gcd_type Value2 >
struct static_gcd_helper_t
{
private:
BOOST_STATIC_CONSTANT( static_gcd_type, new_value1 = Value2 );
BOOST_STATIC_CONSTANT( static_gcd_type, new_value2 = Value1 % Value2 );
#ifndef __BORLANDC__
#define BOOST_DETAIL_GCD_HELPER_VAL(Value) static_cast<static_gcd_type>(Value)
#else
typedef static_gcd_helper_t self_type;
#define BOOST_DETAIL_GCD_HELPER_VAL(Value) (self_type:: Value )
#endif
typedef static_gcd_helper_t< BOOST_DETAIL_GCD_HELPER_VAL(new_value1),
BOOST_DETAIL_GCD_HELPER_VAL(new_value2) > next_step_type;
#undef BOOST_DETAIL_GCD_HELPER_VAL
public:
BOOST_STATIC_CONSTANT( static_gcd_type, value = next_step_type::value );
};
// Non-recursive case
template < static_gcd_type Value1 >
struct static_gcd_helper_t< Value1, 0UL >
{
BOOST_STATIC_CONSTANT( static_gcd_type, value = Value1 );
};
// Build the LCM from the GCD
template < static_gcd_type Value1, static_gcd_type Value2 >
struct static_lcm_helper_t
{
typedef static_gcd_helper_t<Value1, Value2> gcd_type;
BOOST_STATIC_CONSTANT( static_gcd_type, value = Value1 / gcd_type::value
* Value2 );
};
// Special case for zero-GCD values
template < >
struct static_lcm_helper_t< 0UL, 0UL >
{
BOOST_STATIC_CONSTANT( static_gcd_type, value = 0UL );
};
} // namespace detail
// Compile-time greatest common divisor evaluator class declaration --------//
template < static_gcd_type Value1, static_gcd_type Value2 > struct static_gcd
{
BOOST_STATIC_CONSTANT( static_gcd_type, value = (detail::static_gcd_helper_t<Value1, Value2>::value) );
}; // boost::integer::static_gcd
#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
template< static_gcd_type Value1, static_gcd_type Value2 > static_gcd_type const static_gcd< Value1, Value2 >::value;
#endif
// Compile-time least common multiple evaluator class declaration ----------//
template < static_gcd_type Value1, static_gcd_type Value2 > struct static_lcm
{
BOOST_STATIC_CONSTANT( static_gcd_type, value = (detail::static_lcm_helper_t<Value1, Value2>::value) );
}; // boost::integer::static_lcm
#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
template< static_gcd_type Value1, static_gcd_type Value2 > static_gcd_type const static_lcm< Value1, Value2 >::value;
#endif
} // namespace integer
} // namespace boost
#endif // BOOST_INTEGER_COMMON_FACTOR_CT_HPP

Some files were not shown because too many files have changed in this diff Show more