Update to boost 1.68

This avoids warnings from gcc 8
This commit is contained in:
Jean-Marc Lasgouttes 2018-11-23 16:14:23 +01:00
parent 2dc84b69d5
commit c40d23deac
201 changed files with 6316 additions and 1975 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_ST
#define BOOST_BIND_NOEXCEPT
#include <boost/bind/bind_cc.hpp>
# if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED )
# undef BOOST_BIND_NOEXCEPT
# define BOOST_BIND_NOEXCEPT noexcept
# include <boost/bind/bind_cc.hpp>
# endif
#undef BOOST_BIND_CC
#undef BOOST_BIND_ST
#undef BOOST_BIND_NOEXCEPT
#ifdef BOOST_BIND_ENABLE_STDCALL
#define BOOST_BIND_CC __stdcall
#define BOOST_BIND_ST
#define BOOST_BIND_NOEXCEPT
#include <boost/bind/bind_cc.hpp>
#undef BOOST_BIND_CC
#undef BOOST_BIND_ST
#undef BOOST_BIND_NOEXCEPT
#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_ST
#define BOOST_BIND_NOEXCEPT
#include <boost/bind/bind_cc.hpp>
#undef BOOST_BIND_CC
#undef BOOST_BIND_ST
#undef BOOST_BIND_NOEXCEPT
#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_CC
#define BOOST_BIND_NOEXCEPT
#include <boost/bind/bind_cc.hpp>
#undef BOOST_BIND_ST
#undef BOOST_BIND_CC
#undef BOOST_BIND_NOEXCEPT
#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_CC
#define BOOST_BIND_MF_NOEXCEPT
#include <boost/bind/bind_mf_cc.hpp>
#include <boost/bind/bind_mf2_cc.hpp>
# if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED )
# 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_CC
#undef BOOST_BIND_MF_NOEXCEPT
#ifdef BOOST_MEM_FN_ENABLE_CDECL
#define BOOST_BIND_MF_NAME(X) X##_cdecl
#define BOOST_BIND_MF_CC __cdecl
#define BOOST_BIND_MF_NOEXCEPT
#include <boost/bind/bind_mf_cc.hpp>
#include <boost/bind/bind_mf2_cc.hpp>
#undef BOOST_BIND_MF_NAME
#undef BOOST_BIND_MF_CC
#undef BOOST_BIND_MF_NOEXCEPT
#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_CC __stdcall
#define BOOST_BIND_MF_NOEXCEPT
#include <boost/bind/bind_mf_cc.hpp>
#include <boost/bind/bind_mf2_cc.hpp>
#undef BOOST_BIND_MF_NAME
#undef BOOST_BIND_MF_CC
#undef BOOST_BIND_MF_NOEXCEPT
#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_CC __fastcall
#define BOOST_BIND_MF_NOEXCEPT
#include <boost/bind/bind_mf_cc.hpp>
#include <boost/bind/bind_mf2_cc.hpp>
#undef BOOST_BIND_MF_NAME
#undef BOOST_BIND_MF_CC
#undef BOOST_BIND_MF_NOEXCEPT
#endif
@ -2264,6 +2292,15 @@ template< class R, class T > struct add_cref< R (T::*) () const, 1 >
typedef void type;
};
#if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED )
template< class R, class T > struct add_cref< R (T::*) () const noexcept, 1 >
{
typedef void type;
};
#endif // __cpp_noexcept_function_type
#endif // __IBMCPP__
template<class R> struct isref

View File

@ -13,28 +13,28 @@
//
template<class R>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (), _bi::list0>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) ())
_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_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;
return _bi::bind_t<R, F, list_type> (f, list_type());
}
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>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1), A1 a1)
_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) 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;
return _bi::bind_t<R, F, list_type> (f, list_type(a1));
}
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>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2), A1 a1, A2 a2)
_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) 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;
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,
class B1, class B2, class B3,
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>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3)
_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) 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;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
}
@ -53,10 +53,10 @@ template<class R,
template<class R,
class B1, class B2, class B3, class B4,
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>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4)
_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) 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;
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,
class B1, class B2, class B3, class B4, class B5,
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>
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)
_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) 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;
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,
class B1, class B2, class B3, class B4, class B5, class B6,
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>
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)
_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) 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;
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,
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>
_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>
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)
_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) 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;
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,
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>
_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>
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)
_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) 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;
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,
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>
_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>
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)
_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) 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;
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,
class A1>
_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 typename _bi::list_av_1<A1>::type list_type;
@ -27,7 +27,7 @@ template<class R, class T,
template<class R, class T,
class A1>
_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 typename _bi::list_av_1<A1>::type list_type;
@ -38,7 +38,7 @@ template<class Rt2, class R, class T,
class A1>
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>
>::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 typename _bi::list_av_1<A1>::type list_type;
@ -49,7 +49,7 @@ template<class Rt2, class R, class T,
class A1>
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>
>::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 typename _bi::list_av_1<A1>::type list_type;
@ -62,7 +62,7 @@ template<class R, class T,
class B1,
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>
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 typename _bi::list_av_2<A1, A2>::type list_type;
@ -73,7 +73,7 @@ template<class R, class T,
class B1,
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>
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 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>
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>
>::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 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>
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>
>::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 typename _bi::list_av_2<A1, A2>::type list_type;
@ -110,7 +110,7 @@ template<class R, class T,
class B1, class B2,
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>
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 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 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>
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 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>
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>
>::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 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>
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>
>::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 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 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>
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 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 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>
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 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>
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>
>::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 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>
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>
>::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 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 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>
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 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 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>
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 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>
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>
>::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 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>
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>
>::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 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 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>
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 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 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>
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 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>
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>
>::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 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>
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>
>::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 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 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>
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 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 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>
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 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>
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>
>::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 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>
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>
>::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 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 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>
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 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 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>
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 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>
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>
>::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 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>
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>
>::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 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 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>
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 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 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>
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 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>
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>
>::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 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>
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>
>::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 typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;

View File

@ -45,6 +45,7 @@ BOOST_LIB_PREFIX
+ BOOST_LIB_TOOLSET
+ BOOST_LIB_THREAD_OPT
+ BOOST_LIB_RT_OPT
+ BOOST_LIB_ARCH_AND_MODEL_OPT
"-"
+ BOOST_LIB_VERSION
@ -69,6 +70,9 @@ BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used,
p STLport build.
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.
@ -361,6 +365,20 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
#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:
//
@ -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_THREAD_OPT) \
&& defined(BOOST_LIB_RT_OPT) \
&& defined(BOOST_LIB_ARCH_AND_MODEL_OPT) \
&& defined(BOOST_LIB_VERSION)
#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")
# endif
#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
# 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
#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
# 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
@ -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)
# undef BOOST_LIB_RT_OPT
#endif
#if defined(BOOST_LIB_ARCH_AND_MODEL_OPT)
# undef BOOST_LIB_ARCH_AND_MODEL_OPT
#endif
#if defined(BOOST_LIB_LINK_OPT)
# undef BOOST_LIB_LINK_OPT
#endif

View File

@ -174,6 +174,7 @@
#define BOOST_NO_CXX11_CONSTEXPR
#define BOOST_NO_CXX11_DECLTYPE_N3276
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
#define BOOST_NO_CXX11_DEFAULTED_MOVES
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
@ -238,6 +239,9 @@
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR
#endif
#if __BORLANDC__ >= 0x590
# define BOOST_HAS_TR1_HASH

View File

@ -98,11 +98,15 @@
//
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
//
#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
# define BOOST_HAS_DECLSPEC
# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__))
# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__))
#else
# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default")))
# define BOOST_SYMBOL_IMPORT
# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
#endif
#define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
//
// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through
@ -290,6 +294,10 @@
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR
#endif
// Clang 3.9+ in c++1z
#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
# define BOOST_NO_CXX17_INLINE_VARIABLES
@ -318,6 +326,11 @@
// Clang has supported the 'unused' attribute since the first release.
#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
# define BOOST_COMPILER "Clang version " __clang_version__
#endif

View File

@ -167,6 +167,10 @@
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR
#endif
//
// TR1 macros:
//

View File

@ -149,6 +149,10 @@
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR
#endif
#ifdef c_plusplus
// EDG has "long long" in non-strict mode
// However, some libraries have insufficient "long long" support

View File

@ -1,68 +1,227 @@
// (C) Copyright John Maddock 2011.
// (C) Copyright Cray, Inc. 2013
// Copyright 2011 John Maddock
// Copyright 2013, 2017-2018 Cray, Inc.
// 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.
// Greenhills C compiler setup:
// Cray C++ compiler setup.
//
// There are a few parameters that affect the macros defined in this file:
//
// - What version of CCE (Cray Compiling Environment) are we running? This
// comes from the '_RELEASE_MAJOR', '_RELEASE_MINOR', and
// '_RELEASE_PATCHLEVEL' macros.
// - What C++ standards conformance level are we using (e.g. '-h
// std=c++14')? This comes from the '__cplusplus' macro.
// - Are we using GCC extensions ('-h gnu' or '-h nognu')? If we have '-h
// gnu' then CCE emulates GCC, and the macros '__GNUC__',
// '__GNUC_MINOR__', and '__GNUC_PATCHLEVEL__' are defined.
//
// This file is organized as follows:
//
// - Verify that the combination of parameters listed above is supported.
// If we have an unsupported combination, we abort with '#error'.
// - Establish baseline values for all Boost macros.
// - Apply changes to the baseline macros based on compiler version. These
// changes are cummulative so each version section only describes the
// changes since the previous version.
// - Within each version section, we may also apply changes based on
// other parameters (i.e. C++ standards conformance level and GCC
// extensions).
//
// To test changes to this file:
//
// ```
// module load cce/8.6.5 # Pick the version you want to test.
// cd boost/libs/config/test/all
// b2 -j 8 toolset=cray cxxstd=03 cxxstd=11 cxxstd=14 cxxstd-dialect=gnu linkflags=-lrt
// ```
// Note: Using 'cxxstd-dialect=iso' is not supported at this time (the
// tests run, but many tests fail).
//
// Note: 'linkflags=-lrt' is needed in Cray Linux Environment. Otherwise
// you get an 'undefined reference to clock_gettime' error.
//
// Note: If a test '*_fail.cpp' file compiles, but fails to run, then it is
// reported as a defect. However, this is not actually a defect. This is an
// area where the test system is somewhat broken. Tests that are failing
// because of this problem are noted in the comments.
//
// Pay attention to the macro definitions for the macros you wish to
// modify. For example, only macros categorized as compiler macros should
// appear in this file; platform macros should not appear in this file.
// Also, some macros have to be defined to specific values; it is not
// always enough to define or undefine a macro.
//
// Macro definitions are available in the source code at:
//
// `boost/libs/config/doc/html/boost_config/boost_macro_reference.html`
//
// Macro definitions are also available online at:
//
// http://www.boost.org/doc/libs/master/libs/config/doc/html/boost_config/boost_macro_reference.html
//
// Typically, if you enable a feature, and the tests pass, then you have
// nothing to worry about. However, it's sometimes hard to figure out if a
// disabled feature needs to stay disabled. To get a list of disabled
// features, run 'b2' in 'boost/libs/config/checks'. These are the macros
// you should pay attention to (in addition to macros that cause test
// failures).
#define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE)
////
//// Front matter
////
#if _RELEASE < 8
// In a developer build of the Cray compiler (i.e. a compiler built by a
// Cray employee), the release patch level is reported as "x". This gives
// versions that look like e.g. "8.6.x".
//
// To accomplish this, the the Cray compiler preprocessor inserts:
//
// #define _RELEASE_PATCHLEVEL x
//
// If we are using a developer build of the compiler, we want to use the
// configuration macros for the most recent patch level of the release. To
// accomplish this, we'll pretend that _RELEASE_PATCHLEVEL is 99.
//
// However, it's difficult to detect if _RELEASE_PATCHLEVEL is x. We must
// consider that the x will be expanded if x is defined as a macro
// elsewhere. For example, imagine if someone put "-D x=3" on the command
// line, and _RELEASE_PATCHLEVEL is x. Then _RELEASE_PATCHLEVEL would
// expand to 3, and we could not distinguish it from an actual
// _RELEASE_PATCHLEVEL of 3. This problem only affects developer builds; in
// production builds, _RELEASE_PATCHLEVEL is always an integer.
//
// IMPORTANT: In developer builds, if x is defined as a macro, you will get
// an incorrect configuration. The behavior in this case is undefined.
//
// Even if x is not defined, we have to use some trickery to detect if
// _RELEASE_PATCHLEVEL is x. First we define BOOST_CRAY_x to some arbitrary
// magic value, 9867657. Then we use BOOST_CRAY_APPEND to append the
// expanded value of _RELEASE_PATCHLEVEL to the string "BOOST_CRAY_".
//
// - If _RELEASE_PATCHLEVEL is undefined, we get "BOOST_CRAY_".
// - If _RELEASE_PATCHLEVEL is 5, we get "BOOST_CRAY_5".
// - If _RELEASE_PATCHLEVEL is x (and x is not defined) we get
// "BOOST_CRAY_x":
//
// Then we check if BOOST_CRAY_x is equal to the output of
// BOOST_CRAY_APPEND. In other words, the output of BOOST_CRAY_APPEND is
// treated as a macro name, and expanded again. If we can safely assume
// that BOOST_CRAY_ is not a macro defined as our magic number, and
// BOOST_CRAY_5 is not a macro defined as our magic number, then the only
// way the equality test can pass is if _RELEASE_PATCHLEVEL expands to x.
//
// So, that is how we detect if we are using a developer build of the Cray
// compiler.
#define BOOST_CRAY_x 9867657 // Arbitrary number
#define BOOST_CRAY_APPEND(MACRO) BOOST_CRAY_APPEND_INTERNAL(MACRO)
#define BOOST_CRAY_APPEND_INTERNAL(MACRO) BOOST_CRAY_##MACRO
#if BOOST_CRAY_x == BOOST_CRAY_APPEND(_RELEASE_PATCHLEVEL)
// This is a developer build.
//
// - _RELEASE_PATCHLEVEL is defined as x, and x is not defined as a macro.
// Pretend _RELEASE_PATCHLEVEL is 99, so we get the configuration for the
// most recent patch level in this release.
#define BOOST_CRAY_VERSION (_RELEASE_MAJOR * 10000 + _RELEASE_MINOR * 100 + 99)
#else
// This is a production build.
//
// _RELEASE_PATCHLEVEL is not defined as x, or x is defined as a macro.
#define BOOST_CRAY_VERSION (_RELEASE_MAJOR * 10000 + _RELEASE_MINOR * 100 + _RELEASE_PATCHLEVEL)
#endif // BOOST_CRAY_x == BOOST_CRAY_APPEND(_RELEASE_PATCHLEVEL)
#undef BOOST_CRAY_APPEND_INTERNAL
#undef BOOST_CRAY_APPEND
#undef BOOST_CRAY_x
#ifdef __GNUC__
# define BOOST_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#endif
#ifndef BOOST_COMPILER
# define BOOST_COMPILER "Cray C++ version " BOOST_STRINGIZE(_RELEASE_MAJOR) "." BOOST_STRINGIZE(_RELEASE_MINOR) "." BOOST_STRINGIZE(_RELEASE_PATCHLEVEL)
#endif
// Since the Cray compiler defines '__GNUC__', we have to emulate some
// additional GCC macros in order to make everything work.
//
// FIXME: Perhaps Cray should fix the compiler to define these additional
// macros for GCC emulation?
#if __cplusplus >= 201103L && defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__)
# define __GXX_EXPERIMENTAL_CXX0X__ 1
#endif
////
//// Parameter validation
////
// FIXME: Do we really need to support compilers before 8.5? Do they pass
// the Boost.Config tests?
#if BOOST_CRAY_VERSION < 80000
# error "Boost is not configured for Cray compilers prior to version 8, please try the configure script."
#endif
//
// Check this is a recent EDG based compiler, otherwise we don't support it here:
//
#ifndef __EDG_VERSION__
// We only support recent EDG based compilers.
#ifndef __EDG__
# error "Unsupported Cray compiler, please try running the configure script."
#endif
////
//// Baseline values
////
#include <boost/config/compiler/common_edg.hpp>
//
//
#define BOOST_NO_CXX11_STATIC_ASSERT
#define BOOST_HAS_NRVO
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
#define BOOST_HAS_NRVO
#define BOOST_NO_CXX11_VARIADIC_MACROS
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#define BOOST_NO_CXX11_UNICODE_LITERALS
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#define BOOST_HAS_NRVO
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
#define BOOST_NO_CXX11_STATIC_ASSERT
#define BOOST_NO_SFINAE_EXPR
#define BOOST_NO_CXX11_SFINAE_EXPR
#define BOOST_NO_CXX11_SCOPED_ENUMS
#define BOOST_NO_CXX11_RVALUE_REFERENCES
#define BOOST_NO_CXX11_RANGE_BASED_FOR
#define BOOST_NO_CXX11_RAW_LITERALS
#define BOOST_NO_CXX11_NULLPTR
#define BOOST_NO_CXX11_NOEXCEPT
#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_FINAL
#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_FUNCTION_TEMPLATE_DEFAULT_ARGS
#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
#define BOOST_NO_CXX11_DECLTYPE_N3276
#define BOOST_NO_CXX11_DECLTYPE
#define BOOST_NO_CXX11_CONSTEXPR
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
#define BOOST_NO_CXX11_CHAR32_T
#define BOOST_NO_CXX11_CHAR16_T
#define BOOST_NO_CXX11_NOEXCEPT
#define BOOST_NO_CXX11_NULLPTR
#define BOOST_NO_CXX11_RANGE_BASED_FOR
#define BOOST_NO_CXX11_RAW_LITERALS
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
#define BOOST_NO_CXX11_RVALUE_REFERENCES
#define BOOST_NO_CXX11_SCOPED_ENUMS
#define BOOST_NO_CXX11_SFINAE_EXPR
#define BOOST_NO_CXX11_STATIC_ASSERT
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
#define BOOST_NO_CXX11_THREAD_LOCAL
#define BOOST_NO_CXX11_UNICODE_LITERALS
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#define BOOST_NO_CXX11_VARIADIC_MACROS
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_SFINAE_EXPR
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
@ -71,15 +230,15 @@
#define BOOST_SP_USE_PTHREADS
#define BOOST_AC_USE_PTHREADS
/* everything that follows is working around what are thought to be
* compiler shortcomings. Revist all of these regularly.
*/
//
// Everything that follows is working around what are thought to be
// compiler shortcomings. Revist all of these regularly.
//
//#define BOOST_USE_ENUM_STATIC_ASSERT
//#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS //(this may be implied by the previous #define
// These constants should be provided by the
// compiler, at least when -hgnu is asserted on the command line.
// These constants should be provided by the compiler.
#ifndef __ATOMIC_RELAXED
#define __ATOMIC_RELAXED 0
@ -90,5 +249,192 @@
#define __ATOMIC_SEQ_CST 5
#endif
////
//// Version changes
////
//
// 8.5.0
//
#if BOOST_CRAY_VERSION >= 80500
#if __cplusplus >= 201103L
#undef BOOST_HAS_NRVO
#undef BOOST_NO_COMPLETE_VALUE_INITIALIZATION
#undef BOOST_NO_CXX11_AUTO_DECLARATIONS
#undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
#undef BOOST_NO_CXX11_CHAR16_T
#undef BOOST_NO_CXX11_CHAR32_T
#undef BOOST_NO_CXX11_CONSTEXPR
#undef BOOST_NO_CXX11_DECLTYPE
#undef BOOST_NO_CXX11_DECLTYPE_N3276
#undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
#undef BOOST_NO_CXX11_DELETED_FUNCTIONS
#undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
#undef BOOST_NO_CXX11_FINAL
#undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
#undef BOOST_NO_CXX11_LAMBDAS
#undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
#undef BOOST_NO_CXX11_NOEXCEPT
#undef BOOST_NO_CXX11_NULLPTR
#undef BOOST_NO_CXX11_RANGE_BASED_FOR
#undef BOOST_NO_CXX11_RAW_LITERALS
#undef BOOST_NO_CXX11_REF_QUALIFIERS
#undef BOOST_NO_CXX11_RVALUE_REFERENCES
#undef BOOST_NO_CXX11_SCOPED_ENUMS
#undef BOOST_NO_CXX11_SFINAE_EXPR
#undef BOOST_NO_CXX11_STATIC_ASSERT
#undef BOOST_NO_CXX11_TEMPLATE_ALIASES
#undef BOOST_NO_CXX11_THREAD_LOCAL
#undef BOOST_NO_CXX11_UNICODE_LITERALS
#undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#undef BOOST_NO_CXX11_USER_DEFINED_LITERALS
#undef BOOST_NO_CXX11_VARIADIC_MACROS
#undef BOOST_NO_CXX11_VARIADIC_TEMPLATES
#undef BOOST_NO_SFINAE_EXPR
#undef BOOST_NO_TWO_PHASE_NAME_LOOKUP
#undef BOOST_MATH_DISABLE_STD_FPCLASSIFY
#undef BOOST_SP_USE_PTHREADS
#undef BOOST_AC_USE_PTHREADS
#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 < 201402L
#define BOOST_NO_CXX11_DECLTYPE_N3276
#endif // __cplusplus < 201402L
#endif // __cplusplus >= 201103L
#endif // BOOST_CRAY_VERSION >= 80500
//
// 8.6.4
// (versions prior to 8.6.5 do not define _RELEASE_PATCHLEVEL)
//
#if BOOST_CRAY_VERSION >= 80600
#if __cplusplus >= 199711L
#define BOOST_HAS_FLOAT128
#define BOOST_HAS_PTHREAD_YIELD // This is a platform macro, but it improves test results.
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // This is correct. Test compiles, but fails to run.
#undef BOOST_NO_CXX11_CHAR16_T
#undef BOOST_NO_CXX11_CHAR32_T
#undef BOOST_NO_CXX11_INLINE_NAMESPACES
#undef BOOST_NO_CXX11_FINAL
#undef BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
#undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
#define BOOST_NO_CXX11_SFINAE_EXPR // This is correct, even though '*_fail.cpp' test fails.
#undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#undef BOOST_NO_CXX11_VARIADIC_MACROS
#undef BOOST_NO_CXX11_VARIADIC_TEMPLATES
// 'BOOST_NO_DEDUCED_TYPENAME' test is broken. The test files are enabled /
// disabled with an '#ifdef BOOST_DEDUCED_TYPENAME'. However,
// 'boost/libs/config/include/boost/config/detail/suffix.hpp' ensures that
// 'BOOST_DEDUCED_TYPENAME' is always defined (the value it is defined as
// depends on 'BOOST_NO_DEDUCED_TYPENAME'). So, modifying
// 'BOOST_NO_DEDUCED_TYPENAME' has no effect on which tests are run.
//
// The 'no_ded_typename_pass.cpp' test should always compile and run
// successfully, because 'BOOST_DEDUCED_TYPENAME' must always have an
// appropriate value (it's not just something that you turn on or off).
// Therefore, if you wish to test changes to 'BOOST_NO_DEDUCED_TYPENAME',
// you have to modify 'no_ded_typename_pass.cpp' to unconditionally include
// 'boost_no_ded_typename.ipp'.
#undef BOOST_NO_DEDUCED_TYPENAME // This is correct. Test is broken.
#undef BOOST_NO_SFINAE_EXPR
#undef BOOST_NO_TWO_PHASE_NAME_LOOKUP
#endif // __cplusplus >= 199711L
#if __cplusplus >= 201103L
#undef BOOST_NO_CXX11_ALIGNAS
#undef BOOST_NO_CXX11_DECLTYPE_N3276
#define BOOST_NO_CXX11_HDR_ATOMIC
#undef BOOST_NO_CXX11_HDR_FUNCTIONAL
#define BOOST_NO_CXX11_HDR_REGEX // This is correct. Test compiles, but fails to run.
#undef BOOST_NO_CXX11_SFINAE_EXPR
#undef BOOST_NO_CXX11_SMART_PTR
#undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES
#endif // __cplusplus >= 201103L
#if __cplusplus >= 201402L
#undef BOOST_NO_CXX14_CONSTEXPR
#define BOOST_NO_CXX14_DIGIT_SEPARATORS
#endif // __cplusplus == 201402L
#endif // BOOST_CRAY_VERSION >= 80600
//
// 8.6.5
// (no change from 8.6.4)
//
//
// 8.7.0
//
#if BOOST_CRAY_VERSION >= 80700
#if __cplusplus >= 199711L
#endif // __cplusplus >= 199711L
#if __cplusplus >= 201103L
#undef BOOST_NO_CXX11_HDR_ATOMIC
#undef BOOST_NO_CXX11_HDR_REGEX
#endif // __cplusplus >= 201103L
#if __cplusplus >= 201402L
#endif // __cplusplus == 201402L
#endif // BOOST_CRAY_VERSION >= 80700
//
// Next release
//
#if BOOST_CRAY_VERSION > 80799
#if __cplusplus >= 199711L
#endif // __cplusplus >= 199711L
#if __cplusplus >= 201103L
#endif // __cplusplus >= 201103L
#if __cplusplus >= 201402L
#endif // __cplusplus == 201402L
#endif // BOOST_CRAY_VERSION > 80799
////
//// Remove temporary macros
////
// I've commented out some '#undef' statements to signify that we purposely
// want to keep certain macros.
//#undef __GXX_EXPERIMENTAL_CXX0X__
//#undef BOOST_COMPILER
#undef BOOST_GCC_VERSION
#undef BOOST_CRAY_VERSION

View File

@ -12,8 +12,15 @@
#include "boost/config/compiler/common_edg.hpp"
#define BOOST_HAS_LONG_LONG
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS
#define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE
#define BOOST_LOG_NO_MEMBER_TEMPLATE_FRIENDS
#define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
#define BOOST_NO_CXX11_HDR_CODECVT
#define BOOST_NO_CXX11_NUMERIC_LIMITS
#define BOOST_COMPILER "Wind River Diab " BOOST_STRINGIZE(__VERSION_NUMBER__)

View File

@ -124,6 +124,9 @@
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR
#endif
#if (__DMC__ <= 0x840)
#error "Compiler not supported or configured - please reconfigure"

View File

@ -99,10 +99,10 @@
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
//
#if __GNUC__ >= 4
# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__)
# if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
// All Win32 development environments, including 64-bit Windows and MinGW, define
// _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment,
// so does not define _WIN32 or its variants.
// so does not define _WIN32 or its variants, but still supports dllexport/dllimport.
# define BOOST_HAS_DECLSPEC
# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__))
# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__))
@ -233,6 +233,7 @@
//
#if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11)
#define BOOST_NO_CXX11_CONSTEXPR
#define BOOST_NO_CXX11_DEFAULTED_MOVES
#define BOOST_NO_CXX11_NOEXCEPT
#define BOOST_NO_CXX11_NULLPTR
#define BOOST_NO_CXX11_RANGE_BASED_FOR
@ -284,7 +285,7 @@
#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
# define BOOST_NO_CXX14_CONSTEXPR
#endif
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
#if (BOOST_GCC_VERSION < 50200) || !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
@ -298,6 +299,9 @@
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR
#endif
#if __GNUC__ >= 7
# define BOOST_FALLTHROUGH __attribute__((fallthrough))
@ -315,6 +319,10 @@
#if __GNUC__ >= 4
# define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__))
#endif
// Type aliasing hint. Supported since gcc 3.3.
#define BOOST_MAY_ALIAS __attribute__((__may_alias__))
//
// __builtin_unreachable:
#if BOOST_GCC_VERSION >= 40800
@ -338,10 +346,10 @@
# error "Compiler not configured - please reconfigure"
#endif
//
// last known and checked version is 4.9:
#if (BOOST_GCC_VERSION > 40900)
// last known and checked version is 7.1:
#if (BOOST_GCC_VERSION > 70100)
# 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
// 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...

View File

@ -102,6 +102,9 @@
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR
#endif
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__

View File

@ -45,6 +45,7 @@
#undef BOOST_GCC_VERSION
#undef BOOST_GCC_CXX11
#undef BOOST_GCC
// Broken in all versions up to 17 (newer versions not tested)
#if (__INTEL_COMPILER <= 1700) && !defined(BOOST_NO_CXX14_CONSTEXPR)
@ -311,6 +312,12 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
# define BOOST_SYMBOL_IMPORT
# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))
#endif
// Type aliasing hint
#if defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1300)
# define BOOST_MAY_ALIAS __attribute__((__may_alias__))
#endif
//
// C++0x features
// For each feature we need to check both the Intel compiler version,
@ -545,7 +552,7 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
// last known and checked version:
#if (BOOST_INTEL_CXX_VERSION > 1700)
# 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)
//
// We don't emit this warning any more, since we have so few

View File

@ -167,6 +167,9 @@
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR
#endif
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)

View File

@ -116,6 +116,9 @@
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR
#endif
//
// versions check:

View File

@ -12,7 +12,7 @@
#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__
# 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
@ -33,8 +33,8 @@
#if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000)
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#endif
// Most recent CUDA (8.0) has no constexpr support in msvc mode:
#if defined(_MSC_VER)
// CUDA (8.0) has no constexpr support in msvc mode:
#if defined(_MSC_VER) && (BOOST_CUDA_VERSION < 9000000)
# define BOOST_NO_CXX11_CONSTEXPR
#endif

View File

@ -129,4 +129,7 @@
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR
#endif
#endif

View File

@ -1,4 +1,5 @@
// (C) Copyright Noel Belcourt 2007.
// Copyright 2017, NVIDIA CORPORATION.
// 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)
@ -10,159 +11,13 @@
#define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__
#define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
//
// Threading support:
// Turn this on unconditionally here, it will get turned off again later
// if no threading API is detected.
//
// PGI is mostly GNU compatible. So start with that.
#include <boost/config/compiler/gcc.hpp>
#if __PGIC__ >= 11
// Now adjust for things that are different.
// options requested by configure --enable-test
#define BOOST_HAS_PTHREADS
#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
// 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
//
// version check:
// probably nothing to do here?
// __float128 is a typedef, not a distinct type.
#undef BOOST_HAS_FLOAT128
// __int128 is not supported.
#undef BOOST_HAS_INT128

View File

@ -182,6 +182,9 @@
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR
#endif
// Turn on threading support for Solaris 12.
// Ticket #11972
@ -202,9 +205,9 @@
#error "Compiler not supported or configured - please reconfigure"
#endif
//
// last known and checked version is 0x590:
#if (__SUNPRO_CC > 0x590)
// last known and checked version:
#if (__SUNPRO_CC > 0x5150)
# 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

View File

@ -65,6 +65,11 @@
#define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
#endif
// Type aliasing hint. Supported since XL C++ 13.1
#if (__IBMCPP__ >= 1310)
# define BOOST_MAY_ALIAS __attribute__((__may_alias__))
#endif
//
// C++0x features
//
@ -173,3 +178,6 @@
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR
#endif

View File

@ -167,6 +167,7 @@
//
#if (_MSC_FULL_VER < 190023026)
# define BOOST_NO_CXX11_NOEXCEPT
# define BOOST_NO_CXX11_DEFAULTED_MOVES
# define BOOST_NO_CXX11_REF_QUALIFIERS
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
# define BOOST_NO_CXX11_ALIGNAS
@ -200,6 +201,7 @@
//
#if (_MSC_VER < 1911) || (_MSVC_LANG < 201703)
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
# define BOOST_NO_CXX17_IF_CONSTEXPR
#endif
// MSVC including version 14 has not yet completely
@ -217,17 +219,29 @@
// https://connect.microsoft.com/VisualStudio/feedback/details/1582233/c-subobjects-still-not-value-initialized-correctly
// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
// (Niels Dekker, LKEB, May 2010)
// Still present in VC15.5, Dec 2017.
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
//
// C++ 11:
//
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
// This is supported with /permissive- for 15.5 onwards, unfortunately we appear to have no way to tell
// if this is in effect or not, in any case nothing in Boost is currently using this, so we'll just go
// on defining it for now:
//
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#if (_MSC_VER < 1912) || (_MSVC_LANG < 201402)
// Supported from msvc-15.5 onwards:
#define BOOST_NO_CXX11_SFINAE_EXPR
#endif
// C++ 14:
// Still gives internal compiler error for msvc-15.5:
# define BOOST_NO_CXX14_CONSTEXPR
// C++ 17:
#if (_MSC_VER < 1912) || (_MSVC_LANG < 201703)
#define BOOST_NO_CXX17_INLINE_VARIABLES
#define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
//
// Things that don't work in clr mode:
@ -294,7 +308,7 @@
# endif
# endif
# else
# if _MSC_VER < 1310
# if _MSC_VER < 1200
// Note: Versions up to 7.0 aren't supported.
# define BOOST_COMPILER_VERSION 5.0
# elif _MSC_VER < 1300
@ -325,12 +339,17 @@
# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
#endif
#include <boost/config/pragma_message.hpp>
//
// last known and checked version is 19.11.25506 (VC++ 2017.3):
#if (_MSC_VER > 1911)
// last known and checked version is 19.12.25830.2 (VC++ 2017.3):
#if (_MSC_VER > 1912)
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results"
# else
# pragma message("Unknown compiler version - please run the configure tests and report the results")
# error "Boost.Config is older than your current compiler version."
# elif !defined(BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE)
//
// Disabled as of March 2018 - the pace of VS releases is hard to keep up with
// and in any case, we have relatively few defect macros defined now.
// BOOST_PRAGMA_MESSAGE("Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an updated Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.")
# endif
#endif

View File

@ -246,6 +246,10 @@
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#endif
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR
#endif
// Clang 3.9+ in c++1z
#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
# define BOOST_NO_CXX17_INLINE_VARIABLES
@ -267,6 +271,11 @@
# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused))
#endif
// Type aliasing hint.
#if __has_attribute(__may_alias__)
# define BOOST_MAY_ALIAS __attribute__((__may_alias__))
#endif
#ifndef BOOST_COMPILER
# define BOOST_COMPILER "Clang version " __clang_version__
#endif

View File

@ -153,12 +153,14 @@
#define BOOST_NO_CXX17_STRUCTURED_BINDINGS
#define BOOST_NO_CXX17_INLINE_VARIABLES
#define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#define BOOST_NO_CXX17_IF_CONSTEXPR
// -------------------------------------
#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

View File

@ -52,6 +52,10 @@
// 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"
@ -108,10 +112,6 @@
// IBM Visual Age or IBM XL C/C++ for Linux (Big Endian)
# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp"
#elif defined(__PGI)
// Portland Group Inc.
# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp"
#elif defined _MSC_VER
// Microsoft Visual C++
//

View File

@ -537,25 +537,10 @@ namespace std{ using ::type_info; }
// ---------------------------------------------------------------------------//
//
// Helper macro BOOST_STRINGIZE:
// Converts the parameter X to a string after macro replacement
// on X has been performed.
//
#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
#define BOOST_DO_STRINGIZE(X) #X
//
// Helper macro BOOST_JOIN:
// The following piece of macro magic joins the two
// arguments together, even when one of the arguments is
// itself a macro (see 16.3.1 in C++ standard). The key
// is that macro expansion of macro arguments does not
// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
//
#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
#define BOOST_DO_JOIN2( X, Y ) X##Y
#include <boost/config/helper_macros.hpp>
//
// Set some default values for compiler/library/platform names.
@ -602,6 +587,14 @@ namespace std{ using ::type_info; }
# endif
#endif
// BOOST_MAY_ALIAS -----------------------------------------------//
// The macro expands to an attribute to mark a type that is allowed to alias other types.
// The macro is defined in the compiler-specific headers.
#if !defined(BOOST_MAY_ALIAS)
# define BOOST_NO_MAY_ALIAS
# define BOOST_MAY_ALIAS
#endif
// BOOST_FORCEINLINE ---------------------------------------------//
// Macro to use in place of 'inline' to force a function to be inline
#if !defined(BOOST_FORCEINLINE)
@ -694,6 +687,11 @@ namespace std{ using ::type_info; }
# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
#endif
// Lack of defaulted moves is implied by the lack of either rvalue references or any defaulted functions
#if !defined(BOOST_NO_CXX11_DEFAULTED_MOVES) && (defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES))
# define BOOST_NO_CXX11_DEFAULTED_MOVES
#endif
// Defaulted and deleted function declaration helpers
// These macros are intended to be inside a class definition.
// BOOST_DEFAULTED_FUNCTION accepts the function declaration and its

View File

@ -0,0 +1,26 @@
#ifndef BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED
#define BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED
// Copyright 2017 Peter Dimov.
//
// 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
//
// BOOST_HEADER_DEPRECATED("<alternative>")
//
// Expands to the equivalent of
// BOOST_PRAGMA_MESSAGE("This header is deprecated. Use <alternative> instead.")
//
// Note that this header is C compatible.
#include <boost/config/pragma_message.hpp>
#if defined(BOOST_ALLOW_DEPRECATED_HEADERS)
# define BOOST_HEADER_DEPRECATED(a)
#else
# define BOOST_HEADER_DEPRECATED(a) BOOST_PRAGMA_MESSAGE("This header is deprecated. Use " a " instead.")
#endif
#endif // BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED

View File

@ -0,0 +1,37 @@
#ifndef BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED
#define BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED
// Copyright 2001 John Maddock.
// Copyright 2017 Peter Dimov.
//
// 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
//
// BOOST_STRINGIZE(X)
// BOOST_JOIN(X, Y)
//
// Note that this header is C compatible.
//
// Helper macro BOOST_STRINGIZE:
// Converts the parameter X to a string after macro replacement
// on X has been performed.
//
#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
#define BOOST_DO_STRINGIZE(X) #X
//
// Helper macro BOOST_JOIN:
// The following piece of macro magic joins the two
// arguments together, even when one of the arguments is
// itself a macro (see 16.3.1 in C++ standard). The key
// is that macro expansion of macro arguments does not
// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
//
#define BOOST_JOIN(X, Y) BOOST_DO_JOIN(X, Y)
#define BOOST_DO_JOIN(X, Y) BOOST_DO_JOIN2(X,Y)
#define BOOST_DO_JOIN2(X, Y) X##Y
#endif // BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED

View File

@ -38,10 +38,21 @@
#ifdef _STDINT_H
#define BOOST_HAS_STDINT_H
#endif
#if __GNUC__ > 5 && !defined(BOOST_HAS_STDINT_H)
# define BOOST_HAS_STDINT_H
#endif
/// Cygwin has no fenv.h
#define BOOST_NO_FENV_H
// Cygwin has it's own <pthread.h> which breaks <shared_mutex> unless the correct compiler flags are used:
#ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX
#include <pthread.h>
#if !(__XSI_VISIBLE >= 500 || __POSIX_VISIBLE >= 200112)
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
#endif
// boilerplate code:
#include <boost/config/detail/posix_features.hpp>

View File

@ -1,30 +1,50 @@
// (C) Copyright Dustin Spicuzza 2009.
// Adapted to vxWorks 6.9 by Peter Brockamp 2012.
// Updated for VxWorks 7 by 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)
// See http://www.boost.org for most recent version.
// Since WRS does not yet properly support boost under vxWorks
// and this file was badly outdated, but I was keen on using it,
// I patched boost myself to make things work. This has been tested
// and adapted by me for vxWorks 6.9 *only*, as I'm lacking access
// to earlier 6.X versions! The only thing I know for sure is that
// very old versions of vxWorks (namely everything below 6.x) are
// absolutely unable to use boost. This is mainly due to the completely
// outdated libraries and ancient compiler (GCC 2.96 or worse). Do
// not even think of getting this to work, a miserable failure will
// be guaranteed!
// Old versions of vxWorks (namely everything below 6.x) are
// absolutely unable to use boost. Old STLs and compilers
// like (GCC 2.96) . Do not even think of getting this to work,
// a miserable failure will be guaranteed!
//
// Equally, this file has been tested for RTPs (Real Time Processes)
// only, not for DKMs (Downloadable Kernel Modules). These two types
// of executables differ largely in the available functionality of
// the C-library, STL, and so on. A DKM uses a library similar to those
// of vxWorks 5.X - with all its limitations and incompatibilities
// with respect to ANSI C++ and STL. So probably there might be problems
// with the usage of boost from DKMs. WRS or any voluteers are free to
// prove the opposite!
// the C-library, STL, and so on. A DKM uses a C89 library with no
// wide character support and no guarantee of ANSI C. The same Dinkum
// STL library is used in both contexts.
//
// Similarly the Dinkum abridged STL that supports the loosely specified
// embedded C++ standard has not been tested and is unlikely to work
// on anything but the simplest library.
// ====================================================================
//
// Additional Configuration
// -------------------------------------------------------------------
//
// Because of the ordering of include files and other issues the following
// additional definitions worked better outside this file.
//
// When building the log library add the following to the b2 invocation
// define=BOOST_LOG_WITHOUT_IPC
// and
// -DBOOST_LOG_WITHOUT_DEFAULT_FACTORIES
// to your compile options.
//
// When building the test library add
// -DBOOST_TEST_LIMITED_SIGNAL_DETAILS
// to your compile options
//
// When building containers library add
// -DHAVE_MORECORE=0
// to your c compile options so dlmalloc heap library is compiled
// without brk() calls
//
// ====================================================================
//
// Some important information regarding the usage of POSIX semaphores:
@ -38,29 +58,14 @@
// Now, VxWorks POSIX-semaphores for DKM's default to the usage of
// priority inverting semaphores, which is fine. On the other hand,
// for RTP's it defaults to using non priority inverting semaphores,
// which could easily pose a serious problem for a real time process,
// i.e. deadlocks! To overcome this two possibilities do exist:
// which could easily pose a serious problem for a real time process.
//
// a) Patch every piece of boost that uses semaphores to instanciate
// the proper type of semaphores. This is non-intrusive with respect
// to the OS and could relatively easy been done by giving all
// semaphores attributes deviating from the default (for in-depth
// information see the POSIX functions pthread_mutexattr_init()
// and pthread_mutexattr_setprotocol()). However this breaks all
// too easily, as with every new version some boost library could
// all in a sudden start using semaphores, resurrecting the very
// same, hard to locate problem over and over again!
//
// b) We could change the default properties for POSIX-semaphores
// that VxWorks uses for RTP's and this is being suggested here,
// as it will more or less seamlessly integrate with boost. I got
// the following information from WRS how to do this, compare
// Wind River TSR# 1209768:
//
// Instructions for changing the default properties of POSIX-
// semaphores for RTP's in VxWorks 6.9:
// - Edit the file /vxworks-6.9/target/usr/src/posix/pthreadLib.c
// in the root of your Workbench-installation.
// To change the default properties for POSIX-semaphores in VxWorks 7
// enable core > CORE_USER Menu > DEFAULT_PTHREAD_PRIO_INHERIT
//
// In VxWorks 6.x so as to integrate with boost.
// - Edit the file
// installDir/vxworks-6.x/target/usr/src/posix/pthreadLib.c
// - Around line 917 there should be the definition of the default
// mutex attributes:
//
@ -81,30 +86,11 @@
// pAttr->mutexAttrType = PTHREAD_MUTEX_DEFAULT;
//
// Here again, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT.
// - Finally, rebuild your VSB. This will create a new VxWorks kernel
// - Finally, rebuild your VSB. This will rebuild the libraries
// with the changed properties. That's it! Now, using boost should
// no longer cause any problems with task deadlocks!
//
// And here's another useful piece of information concerning VxWorks'
// POSIX-functionality in general:
// VxWorks is not a genuine POSIX-OS in itself, rather it is using a
// kind of compatibility layer (sort of a wrapper) to emulate the
// POSIX-functionality by using its own resources and functions.
// At the time a task (thread) calls it's first POSIX-function during
// runtime it is being transformed by the OS into a POSIX-thread.
// This transformation does include a call to malloc() to allocate the
// memory required for the housekeeping of POSIX-threads. In a high
// priority RTP this malloc() call may be highly undesirable, as its
// timing is more or less unpredictable (depending on what your actual
// heap looks like). You can circumvent this problem by calling the
// function thread_self() at a well defined point in the code of the
// task, e.g. shortly after the task spawns up. Thereby you are able
// to define the time when the task-transformation will take place and
// you could shift it to an uncritical point where a malloc() call is
// tolerable. So, if this could pose a problem for your code, remember
// to call thread_self() from the affected task at an early stage.
//
// ====================================================================
// ====================================================================
// Block out all versions before vxWorks 6.x, as these don't work:
// Include header with the vxWorks version information and query them
@ -158,11 +144,6 @@
#define BOOST_HAS_CLOCK_GETTIME
#define BOOST_HAS_MACRO_USE_FACET
// Generally unavailable functionality, delivered by boost's test function:
//#define BOOST_NO_DEDUCED_TYPENAME // Commented this out, boost's test gives an errorneous result!
#define BOOST_NO_CXX11_EXTERN_TEMPLATE
#define BOOST_NO_CXX11_VARIADIC_MACROS
// Generally available threading API's:
#define BOOST_HAS_PTHREADS
#define BOOST_HAS_SCHED_YIELD
@ -191,14 +172,7 @@
# endif
#endif
// vxWorks doesn't work with asio serial ports:
#define BOOST_ASIO_DISABLE_SERIAL_PORT
// TODO: The problem here seems to bee that vxWorks uses its own, very specific
// ways to handle serial ports, incompatible with POSIX or anything...
// Maybe a specific implementation would be possible, but until the
// straight need arises... This implementation would presumably consist
// of some vxWorks specific ioctl-calls, etc. Any voluteers?
#if (_WRS_VXWORKS_MAJOR < 7)
// vxWorks-around: <time.h> #defines CLOCKS_PER_SEC as sysClkRateGet() but
// miserably fails to #include the required <sysLib.h> to make
// sysClkRateGet() available! So we manually include it here.
@ -208,11 +182,12 @@
#endif
// vxWorks-around: In <stdint.h> the macros INT32_C(), UINT32_C(), INT64_C() and
// UINT64_C() are defined errorneously, yielding not a signed/
// UINT64_C() are defined erroneously, yielding not a signed/
// unsigned long/long long type, but a signed/unsigned int/long
// type. Eventually this leads to compile errors in ratio_fwd.hpp,
// when trying to define several constants which do not fit into a
// long type! We correct them here by redefining.
#include <cstdint>
// Some macro-magic to do the job
@ -231,12 +206,16 @@
#define UINT64_C(x) VX_JOIN(x, ULL)
// #include Libraries required for the following function adaption
#include <sys/time.h>
#endif // _WRS_VXWORKS_MAJOR < 7
#include <ioLib.h>
#include <tickLib.h>
#include <sys/time.h>
// Use C-linkage for the following helper functions
#ifdef __cplusplus
extern "C" {
#endif
// vxWorks-around: The required functions getrlimit() and getrlimit() are missing.
// But we have the similar functions getprlimit() and setprlimit(),
@ -248,7 +227,7 @@ extern "C" {
// TODO: getprlimit() and setprlimit() do exist for RTPs only, for whatever reason.
// Thus for DKMs there would have to be another implementation.
#ifdef __RTP__
#if defined ( __RTP__) && (_WRS_VXWORKS_MAJOR < 7)
inline int getrlimit(int resource, struct rlimit *rlp){
return getprlimit(0, 0, resource, rlp);
}
@ -273,14 +252,20 @@ inline int truncate(const char *p, off_t l){
return close(fd);
}
#ifdef __GNUC__
#define ___unused __attribute__((unused))
#else
#define ___unused
#endif
// Fake symlink handling by dummy functions:
inline int symlink(const char*, const char*){
inline int symlink(const char* path1 ___unused, const char* path2 ___unused){
// vxWorks has no symlinks -> always return an error!
errno = EACCES;
return -1;
}
inline ssize_t readlink(const char*, char*, size_t){
inline ssize_t readlink(const char* path1 ___unused, char* path2 ___unused, size_t size ___unused){
// vxWorks has no symlinks -> always return an error!
errno = EACCES;
return -1;
@ -297,8 +282,18 @@ inline int gettimeofday(struct timeval *tv, void * /*tzv*/) {
}
#endif
#ifdef __cplusplus
} // extern "C"
#endif
// vxWorks does provide neither struct tms nor function times()!
/*
* moved to os/utils/unix/freind_h/times.h in VxWorks 7
* to avoid conflict with MPL operator times
*/
#if (_WRS_VXWORKS_MAJOR < 7)
#ifdef __cplusplus
// vxWorks provides neither struct tms nor function times()!
// We implement an empty dummy-function, simply setting the user
// and system time to the half of thew actual system ticks-value
// and the child user and system time to 0.
@ -315,7 +310,8 @@ struct tms{
clock_t tms_cstime; // System CPU time of terminated child processes
};
inline clock_t times(struct tms *t){
inline clock_t times(struct tms *t){
struct timespec ts;
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts);
clock_t ticks(static_cast<clock_t>(static_cast<double>(ts.tv_sec) * CLOCKS_PER_SEC +
@ -327,8 +323,16 @@ inline clock_t times(struct tms *t){
return ticks;
}
extern void bzero (void *, size_t); // FD_ZERO uses bzero() but doesn't include strings.h
} // extern "C"
namespace std {
using ::times;
}
#endif // __cplusplus
#endif // _WRS_VXWORKS_MAJOR < 7
#ifdef __cplusplus
extern "C" void bzero (void *, size_t); // FD_ZERO uses bzero() but doesn't include strings.h
// Put the selfmade functions into the std-namespace, just in case
namespace std {
@ -339,9 +343,11 @@ namespace std {
using ::truncate;
using ::symlink;
using ::readlink;
using ::times;
using ::gettimeofday;
#if (_WRS_VXWORKS_MAJOR < 7)
using ::gettimeofday;
#endif
}
#endif // __cplusplus
// Some more macro-magic:
// vxWorks-around: Some functions are not present or broken in vxWorks
@ -349,12 +355,13 @@ namespace std {
// Include signal.h which might contain a typo to be corrected here
#include <signal.h>
inline int getpagesize() { return sysconf(_SC_PAGESIZE); } // getpagesize is deprecated anyway!
#if (_WRS_VXWORKS_MAJOR < 7)
#define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway!
inline int lstat(p, b) { return stat(p, b); } // lstat() == stat(), as vxWorks has no symlinks!
#endif
#ifndef S_ISSOCK
# define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket?
#endif
inline int lstat(p, b) { return stat(p, b); } // lstat() == stat(), as vxWorks has no symlinks!
#ifndef FPE_FLTINV
# define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy
#endif
@ -371,22 +378,56 @@ typedef int locale_t; // locale_t is a POSIX-ex
// 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)
// by examining the Dinkum STL version and GCC version (or ICC and DCC)
#ifndef _WRS_CONFIG_LANG_LIB_CPLUS_CPLUS_USER_2011
# define BOOST_NO_CXX11_ADDRESSOF // C11 addressof operator on memory location
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_NUMERIC_LIMITS // max_digits10 in test/../print_helper.hpp
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_STD_ALIGN
# define BOOST_NO_CXX11_HDR_ARRAY
# define BOOST_NO_CXX11_HDR_ATOMIC
# define BOOST_NO_CXX11_HDR_CHRONO
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
# define BOOST_NO_CXX11_HDR_FORWARD_LIST //serialization/test/test_list.cpp
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
# define BOOST_NO_CXX11_HDR_FUTURE
# define BOOST_NO_CXX11_HDR_MUTEX
# define BOOST_NO_CXX11_HDR_RANDOM //math/../test_data.hpp
# define BOOST_NO_CXX11_HDR_RATIO
# define BOOST_NO_CXX11_HDR_REGEX
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
# define BOOST_NO_CXX11_HDR_THREAD
# 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
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
#else
# define BOOST_NO_CXX11_NULLPTR
#ifndef BOOST_SYSTEM_NO_DEPRECATED
# define BOOST_SYSTEM_NO_DEPRECATED // workaround link error in spirit
#endif
#endif
// NONE is used in enums in lamda and other libraries
#undef NONE
// restrict is an iostreams class
#undef restrict
// use fake poll() from Unix layer in ASIO to get full functionality
// most libraries will use select() but this define allows 'iostream' functionality
// which is based on poll() only
#if (_WRS_VXWORKS_MAJOR > 6)
# ifndef BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR
# define BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR
# endif
#else
# define BOOST_ASIO_DISABLE_SERIAL_PORT
#endif

View File

@ -0,0 +1,31 @@
#ifndef BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED
#define BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED
// Copyright 2017 Peter Dimov.
//
// 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
//
// BOOST_PRAGMA_MESSAGE("message")
//
// Expands to the equivalent of #pragma message("message")
//
// Note that this header is C compatible.
#include <boost/config/helper_macros.hpp>
#if defined(BOOST_DISABLE_PRAGMA_MESSAGE)
# define BOOST_PRAGMA_MESSAGE(x)
#elif defined(__INTEL_COMPILER)
# define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x))
#elif defined(__GNUC__)
# define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x)))
#elif defined(_MSC_VER)
# define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x))
#else
# define BOOST_PRAGMA_MESSAGE(x)
#endif
#endif // BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED

View File

@ -96,7 +96,8 @@
#include <exception>
#endif
#include <typeinfo>
#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__)
#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (defined(__ghs__) && !_HAS_NAMESPACE) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) \
&& !defined(__VXWORKS__)
# define BOOST_NO_STD_TYPEINFO
#endif
@ -172,11 +173,17 @@
// 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_ITERATOR_TRAITS
#endif
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650)
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0) || !defined(_MSVC_STL_UPDATE) || (_MSVC_STL_UPDATE < 201709)
# define BOOST_NO_CXX17_STD_INVOKE
#endif
#if !(!defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(BOOST_MSVC) || (BOOST_MSVC < 1912) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0))
// Deprecated std::iterator:
# define BOOST_NO_STD_ITERATOR
#endif
#if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400)
// Intel's compiler can't handle this header yet:
# define BOOST_NO_CXX11_HDR_ATOMIC

View File

@ -79,6 +79,7 @@
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS
//
// Intrinsic type_traits support.

View File

@ -87,9 +87,6 @@
#endif
// C++17 features
#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L)
# define BOOST_NO_CXX17_STD_INVOKE
#endif
#if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L)
# define BOOST_NO_CXX17_STD_APPLY
#endif
@ -103,6 +100,9 @@
# define BOOST_NO_CXX98_BINDERS
#endif
#define BOOST_NO_CXX17_ITERATOR_TRAITS
#define BOOST_NO_CXX17_STD_INVOKE // Invoke support is incomplete (no invoke_result)
#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
// support for thread_local, leading to linker errors such as
@ -111,6 +111,13 @@
# define BOOST_NO_CXX11_THREAD_LOCAL
#endif
#if defined(__linux__) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
// After libc++-dev is installed on Trusty, clang++-libc++ almost works,
// except uses of `thread_local` fail with undefined reference to
// `__cxa_thread_atexit`.
# define BOOST_NO_CXX11_THREAD_LOCAL
#endif
#if defined(__has_include)
#if !__has_include(<shared_mutex>)
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX

View File

@ -78,6 +78,7 @@
# include <unistd.h>
#endif
#ifndef __VXWORKS__ // VxWorks uses Dinkum, not GNU STL with GCC
#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0
# define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx
# define BOOST_HAS_SLIST
@ -91,6 +92,7 @@
# define BOOST_HASH_MAP_HEADER <backward/hash_map>
# endif
#endif
#endif
//
// Decide whether we have C++11 support turned on:
@ -247,6 +249,7 @@ extern "C" char *gets (char *__s);
#if (BOOST_LIBSTDCXX_VERSION < 40600) || !defined(BOOST_LIBSTDCXX11)
# define BOOST_NO_CXX11_HDR_TYPEINDEX
# define BOOST_NO_CXX11_ADDRESSOF
# define BOOST_NO_CXX17_ITERATOR_TRAITS
#endif
// C++0x features in GCC 4.7.0 and later
@ -291,12 +294,10 @@ extern "C" char *gets (char *__s);
#endif
//
// C++17 features in GCC 6.1 and later
// C++17 features in GCC 7.1 and later
//
#if (BOOST_LIBSTDCXX_VERSION < 60100) || (__cplusplus <= 201402L)
# define BOOST_NO_CXX17_STD_INVOKE
#endif
#if (BOOST_LIBSTDCXX_VERSION < 70100) || (__cplusplus <= 201402L)
# define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_STD_APPLY
#endif

View File

@ -68,6 +68,7 @@
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS
#define BOOST_STDLIB "Modena C++ standard library"

View File

@ -92,5 +92,6 @@
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS
#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__)

View File

@ -204,3 +204,4 @@
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS

View File

@ -162,5 +162,6 @@
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS
#define BOOST_STDLIB "SGI standard library"

View File

@ -252,5 +252,6 @@ namespace boost { using std::min; using std::max; }
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS
#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)

View File

@ -68,5 +68,6 @@
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS
#define BOOST_STDLIB "Visual Age default standard library"

View File

@ -57,3 +57,4 @@
#define BOOST_NO_CXX17_STD_INVOKE
#define BOOST_NO_CXX17_STD_APPLY
#define BOOST_NO_CXX17_ITERATOR_TRAITS

View File

@ -87,8 +87,10 @@
#endif
#ifndef BOOST_GCC
#define BOOST_GCC_WORKAROUND_GUARD 1
#define BOOST_GCC_VERSION_WORKAROUND_GUARD 1
#else
#define BOOST_GCC_WORKAROUND_GUARD 0
#define BOOST_GCC_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_XLCPP_ZOS
#define BOOST_XLCPP_ZOS_WORKAROUND_GUARD 1

View File

@ -67,7 +67,7 @@ namespace detail{
//Create namespace to avoid compilation errors
}}}
namespace boost{ namespace container{ namespace container_detail{
namespace boost{ namespace container{ namespace dtl{
namespace bi = boost::intrusive;
namespace bid = boost::intrusive::detail;
}}}
@ -88,23 +88,14 @@ namespace boost{ namespace container{ namespace pmr{
namespace boost {
namespace container {
//! Enumeration used to configure ordered associative containers
//! with a concrete tree implementation.
enum tree_type_enum
{
red_black_tree,
avl_tree,
scapegoat_tree,
splay_tree
};
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
template<class T>
class new_allocator;
template <class T
,class Allocator = new_allocator<T> >
,class Allocator = new_allocator<T>
,class Options = void>
class vector;
template <class T
@ -130,35 +121,30 @@ template <class T
,class Allocator = new_allocator<T> >
class slist;
template<tree_type_enum TreeType, bool OptimizeSize>
struct tree_opt;
typedef tree_opt<red_black_tree, true> tree_assoc_defaults;
template <class Key
,class Compare = std::less<Key>
,class Allocator = new_allocator<Key>
,class Options = tree_assoc_defaults >
,class Options = void>
class set;
template <class Key
,class Compare = std::less<Key>
,class Allocator = new_allocator<Key>
,class Options = tree_assoc_defaults >
,class Options = void >
class multiset;
template <class Key
,class T
,class Compare = std::less<Key>
,class Allocator = new_allocator<std::pair<const Key, T> >
,class Options = tree_assoc_defaults >
,class Options = void >
class map;
template <class Key
,class T
,class Compare = std::less<Key>
,class Allocator = new_allocator<std::pair<const Key, T> >
,class Options = tree_assoc_defaults >
,class Options = void >
class multimap;
template <class Key
@ -246,13 +232,6 @@ class synchronized_pool_resource;
} //namespace pmr {
#else
//! Default options for tree-based associative containers
//! - tree_type<red_black_tree>
//! - optimize_size<true>
typedef implementation_defined tree_assoc_defaults;
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
//! Type used to tag that the input range is

View File

@ -11,9 +11,9 @@
#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/container_hash/detail/float_functions.hpp>
#include <boost/container_hash/detail/limits.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/integer/static_log2.hpp>
#include <boost/cstdint.hpp>
#include <boost/assert.hpp>
@ -241,7 +241,7 @@ namespace boost
template <class T>
inline bool is_zero(T v)
{
#if !defined(__GNUC__)
#if !defined(__GNUC__) && !defined(__clang__)
return v == 0;
#else
// GCC's '-Wfloat-equal' will complain about comparing

View File

@ -5,7 +5,7 @@
// Based on Peter Dimov's proposal
// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
// issue 6.18.
// issue 6.18.
// This implements the extensions to the standard.
// It's undocumented, so you shouldn't use it....
@ -18,12 +18,11 @@
#pragma once
#endif
#include <boost/functional/hash/hash.hpp>
#include <boost/container_hash/hash.hpp>
#include <boost/detail/container_fwd.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/static_assert.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <vector>
#if !defined(BOOST_NO_CXX11_HDR_ARRAY)
# include <array>
@ -72,6 +71,56 @@ namespace boost
return seed;
}
inline std::size_t hash_range(
std::vector<bool>::iterator first,
std::vector<bool>::iterator last)
{
std::size_t seed = 0;
for(; first != last; ++first)
{
hash_combine<bool>(seed, *first);
}
return seed;
}
inline std::size_t hash_range(
std::vector<bool>::const_iterator first,
std::vector<bool>::const_iterator last)
{
std::size_t seed = 0;
for(; first != last; ++first)
{
hash_combine<bool>(seed, *first);
}
return seed;
}
inline void hash_range(
std::size_t& seed,
std::vector<bool>::iterator first,
std::vector<bool>::iterator last)
{
for(; first != last; ++first)
{
hash_combine<bool>(seed, *first);
}
}
inline void hash_range(
std::size_t& seed,
std::vector<bool>::const_iterator first,
std::vector<bool>::const_iterator last)
{
for(; first != last; ++first)
{
hash_combine<bool>(seed, *first);
}
}
template <class T, class A>
std::size_t hash_value(std::vector<T, A> const& v)
{
@ -171,19 +220,66 @@ namespace boost
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); \
template<typename A0>
inline std::size_t hash_value(std::tuple<A0> const& v)
{
return boost::hash_detail::hash_tuple(v);
}
template<typename A0, typename A1>
inline std::size_t hash_value(std::tuple<A0, A1> const& v)
{
return boost::hash_detail::hash_tuple(v);
}
template<typename A0, typename A1, typename A2>
inline std::size_t hash_value(std::tuple<A0, A1, A2> const& v)
{
return boost::hash_detail::hash_tuple(v);
}
template<typename A0, typename A1, typename A2, typename A3>
inline std::size_t hash_value(std::tuple<A0, A1, A2, A3> const& v)
{
return boost::hash_detail::hash_tuple(v);
}
template<typename A0, typename A1, typename A2, typename A3, typename A4>
inline std::size_t hash_value(std::tuple<A0, A1, A2, A3, A4> const& v)
{
return boost::hash_detail::hash_tuple(v);
}
template<typename A0, typename A1, typename A2, typename A3, typename A4, typename A5>
inline std::size_t hash_value(std::tuple<A0, A1, A2, A3, A4, A5> const& v)
{
return boost::hash_detail::hash_tuple(v);
}
template<typename A0, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
inline std::size_t hash_value(std::tuple<A0, A1, A2, A3, A4, A5, A6> const& v)
{
return boost::hash_detail::hash_tuple(v);
}
template<typename A0, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
inline std::size_t hash_value(std::tuple<A0, A1, A2, A3, A4, A5, A6, A7> const& v)
{
return boost::hash_detail::hash_tuple(v);
}
template<typename A0, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
inline std::size_t hash_value(std::tuple<A0, A1, A2, A3, A4, A5, A6, A7, A8> const& v)
{
return boost::hash_detail::hash_tuple(v);
}
template<typename A0, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
inline std::size_t hash_value(std::tuple<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9> 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

View File

@ -5,7 +5,7 @@
// Based on Peter Dimov's proposal
// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
// issue 6.18.
// issue 6.18.
//
// This also contains public domain code from MurmurHash. From the
// MurmurHash header:
@ -16,14 +16,14 @@
#if !defined(BOOST_FUNCTIONAL_HASH_HASH_HPP)
#define BOOST_FUNCTIONAL_HASH_HASH_HPP
#include <boost/functional/hash/hash_fwd.hpp>
#include <boost/container_hash/hash_fwd.hpp>
#include <functional>
#include <boost/functional/hash/detail/hash_float.hpp>
#include <boost/container_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/core/enable_if.hpp>
#include <boost/cstdint.hpp>
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
@ -34,6 +34,10 @@
#include <typeindex>
#endif
#if !defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR)
#include <system_error>
#endif
#if defined(BOOST_MSVC)
#pragma warning(push)
@ -58,6 +62,58 @@
# define BOOST_FUNCTIONAL_HASH_ROTL32(x, r) (x << r) | (x >> (32 - r))
#endif
// Detect whether standard library has C++17 headers
#if !defined(BOOST_HASH_CXX17)
# if defined(BOOST_MSVC)
# if defined(_HAS_CXX17) && _HAS_CXX17
# define BOOST_HASH_CXX17 1
# endif
# elif defined(__cplusplus) && __cplusplus >= 201703
# define BOOST_HASH_CXX17 1
# endif
#endif
#if !defined(BOOST_HASH_CXX17)
# define BOOST_HASH_CXX17 0
#endif
#if BOOST_HASH_CXX17 && defined(__has_include)
# if !defined(BOOST_HASH_HAS_STRING_VIEW) && __has_include(<string_view>)
# define BOOST_HASH_HAS_STRING_VIEW 1
# endif
# if !defined(BOOST_HASH_HAS_OPTIONAL) && __has_include(<optional>)
# define BOOST_HASH_HAS_OPTIONAL 1
# endif
# if !defined(BOOST_HASH_HAS_VARIANT) && __has_include(<variant>)
# define BOOST_HASH_HAS_VARIANT 1
# endif
#endif
#if !defined(BOOST_HASH_HAS_STRING_VIEW)
# define BOOST_HASH_HAS_STRING_VIEW 0
#endif
#if !defined(BOOST_HASH_HAS_OPTIONAL)
# define BOOST_HASH_HAS_OPTIONAL 0
#endif
#if !defined(BOOST_HASH_HAS_VARIANT)
# define BOOST_HASH_HAS_VARIANT 0
#endif
#if BOOST_HASH_HAS_STRING_VIEW
# include <string_view>
#endif
#if BOOST_HASH_HAS_OPTIONAL
# include <optional>
#endif
#if BOOST_HASH_HAS_VARIANT
# include <variant>
#endif
namespace boost
{
namespace hash_detail
@ -176,13 +232,35 @@ namespace boost
std::size_t hash_value(
std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const&);
#if BOOST_HASH_HAS_STRING_VIEW
template <class Ch>
std::size_t hash_value(
std::basic_string_view<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch> > const&);
#endif
template <typename T>
typename boost::hash_detail::float_numbers<T>::type hash_value(T);
#if BOOST_HASH_HAS_OPTIONAL
template <typename T>
std::size_t hash_value(std::optional<T> const&);
#endif
#if BOOST_HASH_HAS_VARIANT
std::size_t hash_value(std::monostate);
template <typename... Types>
std::size_t hash_value(std::variant<Types...> const&);
#endif
#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
std::size_t hash_value(std::type_index);
#endif
#if !defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR)
std::size_t hash_value(std::error_code const&);
std::size_t hash_value(std::error_condition const&);
#endif
// Implementation
namespace hash_detail
@ -410,12 +488,49 @@ namespace boost
return hash_range(v.begin(), v.end());
}
#if BOOST_HASH_HAS_STRING_VIEW
template <class Ch>
inline std::size_t hash_value(
std::basic_string_view<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch> > const& v)
{
return hash_range(v.begin(), v.end());
}
#endif
template <typename T>
typename boost::hash_detail::float_numbers<T>::type hash_value(T v)
{
return boost::hash_detail::float_hash_value(v);
}
#if BOOST_HASH_HAS_OPTIONAL
template <typename T>
inline std::size_t hash_value(std::optional<T> const& v) {
if (!v) {
// Arbitray value for empty optional.
return 0x12345678;
} else {
boost::hash<T> hf;
return hf(*v);
}
}
#endif
#if BOOST_HASH_HAS_VARIANT
inline std::size_t hash_value(std::monostate) {
return 0x87654321;
}
template <typename... Types>
inline std::size_t hash_value(std::variant<Types...> const& v) {
std::size_t seed = 0;
hash_combine(seed, v.index());
std::visit([&seed](auto&& x) { hash_combine(seed, x); }, v);
return seed;
}
#endif
#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
inline std::size_t hash_value(std::type_index v)
{
@ -423,14 +538,30 @@ namespace boost
}
#endif
#if !defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR)
inline std::size_t hash_value(std::error_code const& v) {
std::size_t seed = 0;
hash_combine(seed, v.value());
hash_combine(seed, &v.category());
return seed;
}
inline std::size_t hash_value(std::error_condition const& v) {
std::size_t seed = 0;
hash_combine(seed, v.value());
hash_combine(seed, &v.category());
return seed;
}
#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.
//
@ -459,6 +590,16 @@ namespace boost
} \
};
#define BOOST_HASH_SPECIALIZE_TEMPLATE_REF(type) \
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)
@ -494,6 +635,19 @@ namespace boost
BOOST_HASH_SPECIALIZE_REF(std::basic_string<char32_t>)
#endif
#if BOOST_HASH_HAS_STRING_VIEW
BOOST_HASH_SPECIALIZE_REF(std::string_view)
# if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
BOOST_HASH_SPECIALIZE_REF(std::wstring_view)
# endif
# if !defined(BOOST_NO_CXX11_CHAR16_T)
BOOST_HASH_SPECIALIZE_REF(std::basic_string_view<char16_t>)
# endif
# if !defined(BOOST_NO_CXX11_CHAR32_T)
BOOST_HASH_SPECIALIZE_REF(std::basic_string_view<char32_t>)
# endif
#endif
#if !defined(BOOST_NO_LONG_LONG)
BOOST_HASH_SPECIALIZE(boost::long_long_type)
BOOST_HASH_SPECIALIZE(boost::ulong_long_type)
@ -504,12 +658,24 @@ namespace boost
BOOST_HASH_SPECIALIZE(boost::uint128_type)
#endif
#if BOOST_HASH_HAS_OPTIONAL
template <typename T>
BOOST_HASH_SPECIALIZE_TEMPLATE_REF(std::optional<T>)
#endif
#if !defined(BOOST_HASH_HAS_VARIANT)
template <typename... T>
BOOST_HASH_SPECIALIZE_TEMPLATE_REF(std::variant<T...>)
BOOST_HASH_SPECIALIZE(std::monostate)
#endif
#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
BOOST_HASH_SPECIALIZE(std::type_index)
#endif
#undef BOOST_HASH_SPECIALIZE
#undef BOOST_HASH_SPECIALIZE_REF
#undef BOOST_HASH_SPECIALIZE_TEMPLATE_REF
// Specializing boost::hash for pointers.
@ -591,5 +757,5 @@ namespace boost
#if !defined(BOOST_HASH_NO_EXTENSIONS) \
&& !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP)
#include <boost/functional/hash/extensions.hpp>
#include <boost/container_hash/extensions.hpp>
#endif

View File

@ -10,13 +10,13 @@
#if !defined(BOOST_FUNCTIONAL_HASH_FWD_HPP)
#define BOOST_FUNCTIONAL_HASH_FWD_HPP
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#include <cstddef>
#if defined(BOOST_HAS_PRAGMA_ONCE)
#pragma once
#endif
#include <cstddef>
#include <boost/detail/workaround.hpp>
namespace boost
{

View File

@ -49,20 +49,20 @@ namespace boost {
namespace detail {
template<class T>
class addressof_ref {
class addrof_ref {
public:
BOOST_FORCEINLINE addressof_ref(T& o) BOOST_NOEXCEPT
BOOST_FORCEINLINE addrof_ref(T& o) BOOST_NOEXCEPT
: o_(o) { }
BOOST_FORCEINLINE operator T&() const BOOST_NOEXCEPT {
return o_;
}
private:
addressof_ref& operator=(const addressof_ref&);
addrof_ref& operator=(const addrof_ref&);
T& o_;
};
template<class T>
struct address_of {
struct addrof {
static BOOST_FORCEINLINE T* get(T& o, long) BOOST_NOEXCEPT {
return reinterpret_cast<T*>(&
const_cast<char&>(reinterpret_cast<const volatile char&>(o)));
@ -76,38 +76,38 @@ struct address_of {
#if !defined(BOOST_NO_CXX11_DECLTYPE) && \
(defined(__INTEL_COMPILER) || \
(defined(__clang__) && !defined(_LIBCPP_VERSION)))
typedef decltype(nullptr) addressof_null_t;
typedef decltype(nullptr) addrof_null_t;
#else
typedef std::nullptr_t addressof_null_t;
typedef std::nullptr_t addrof_null_t;
#endif
template<>
struct address_of<addressof_null_t> {
typedef addressof_null_t type;
struct addrof<addrof_null_t> {
typedef addrof_null_t type;
static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT {
return &o;
}
};
template<>
struct address_of<const addressof_null_t> {
typedef const addressof_null_t type;
struct addrof<const addrof_null_t> {
typedef const addrof_null_t type;
static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT {
return &o;
}
};
template<>
struct address_of<volatile addressof_null_t> {
typedef volatile addressof_null_t type;
struct addrof<volatile addrof_null_t> {
typedef volatile addrof_null_t type;
static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT {
return &o;
}
};
template<>
struct address_of<const volatile addressof_null_t> {
typedef const volatile addressof_null_t type;
struct addrof<const volatile addrof_null_t> {
typedef const volatile addrof_null_t type;
static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT {
return &o;
}
@ -127,9 +127,9 @@ addressof(T& o) BOOST_NOEXCEPT
{
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) || \
BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5120)
return detail::address_of<T>::get(o, 0);
return boost::detail::addrof<T>::get(o, 0);
#else
return detail::address_of<T>::get(detail::addressof_ref<T>(o), 0);
return boost::detail::addrof<T>::get(boost::detail::addrof_ref<T>(o), 0);
#endif
}
@ -137,14 +137,14 @@ addressof(T& o) BOOST_NOEXCEPT
namespace detail {
template<class T>
struct addressof_result {
struct addrof_result {
typedef T* type;
};
} /* detail */
template<class T, std::size_t N>
BOOST_FORCEINLINE typename detail::addressof_result<T[N]>::type
BOOST_FORCEINLINE typename boost::detail::addrof_result<T[N]>::type
addressof(T (&o)[N]) BOOST_NOEXCEPT
{
return &o;
@ -170,79 +170,79 @@ const T (*addressof(const T (&o)[N]) BOOST_NOEXCEPT)[N]
namespace detail {
template<class T>
T addressof_declval() BOOST_NOEXCEPT;
T addrof_declval() BOOST_NOEXCEPT;
template<class>
struct addressof_void {
struct addrof_void {
typedef void type;
};
template<class T, class E = void>
struct addressof_member_operator {
struct addrof_member_operator {
static constexpr bool value = false;
};
template<class T>
struct addressof_member_operator<T, typename
addressof_void<decltype(addressof_declval<T&>().operator&())>::type> {
struct addrof_member_operator<T, typename
addrof_void<decltype(addrof_declval<T&>().operator&())>::type> {
static constexpr bool value = true;
};
#if BOOST_WORKAROUND(BOOST_INTEL, < 1600)
struct addressof_addressable { };
struct addrof_addressable { };
addressof_addressable*
operator&(addressof_addressable&) BOOST_NOEXCEPT;
addrof_addressable*
operator&(addrof_addressable&) BOOST_NOEXCEPT;
#endif
template<class T, class E = void>
struct addressof_non_member_operator {
struct addrof_non_member_operator {
static constexpr bool value = false;
};
template<class T>
struct addressof_non_member_operator<T, typename
addressof_void<decltype(operator&(addressof_declval<T&>()))>::type> {
struct addrof_non_member_operator<T, typename
addrof_void<decltype(operator&(addrof_declval<T&>()))>::type> {
static constexpr bool value = true;
};
template<class T, class E = void>
struct addressof_expression {
struct addrof_expression {
static constexpr bool value = false;
};
template<class T>
struct addressof_expression<T,
typename addressof_void<decltype(&addressof_declval<T&>())>::type> {
struct addrof_expression<T,
typename addrof_void<decltype(&addrof_declval<T&>())>::type> {
static constexpr bool value = true;
};
template<class T>
struct addressof_is_constexpr {
static constexpr bool value = addressof_expression<T>::value &&
!addressof_member_operator<T>::value &&
!addressof_non_member_operator<T>::value;
struct addrof_is_constexpr {
static constexpr bool value = addrof_expression<T>::value &&
!addrof_member_operator<T>::value &&
!addrof_non_member_operator<T>::value;
};
template<bool E, class T>
struct addressof_if { };
struct addrof_if { };
template<class T>
struct addressof_if<true, T> {
struct addrof_if<true, T> {
typedef T* type;
};
template<class T>
BOOST_FORCEINLINE
typename addressof_if<!addressof_is_constexpr<T>::value, T>::type
typename addrof_if<!addrof_is_constexpr<T>::value, T>::type
addressof(T& o) BOOST_NOEXCEPT
{
return address_of<T>::get(addressof_ref<T>(o), 0);
return addrof<T>::get(addrof_ref<T>(o), 0);
}
template<class T>
constexpr BOOST_FORCEINLINE
typename addressof_if<addressof_is_constexpr<T>::value, T>::type
typename addrof_if<addrof_is_constexpr<T>::value, T>::type
addressof(T& o) BOOST_NOEXCEPT
{
return &o;
@ -254,7 +254,7 @@ template<class T>
constexpr BOOST_FORCEINLINE T*
addressof(T& o) BOOST_NOEXCEPT
{
return detail::addressof(o);
return boost::detail::addressof(o);
}
#endif

View File

@ -34,6 +34,17 @@
#endif
#include <boost/config.hpp>
//
// For the following code we get several warnings along the lines of:
//
// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant
//
// So we declare this a system header to suppress these warnings.
// See also https://github.com/boostorg/config/issues/190
//
#if defined(__GNUC__) && (__GNUC__ >= 4)
#pragma GCC system_header
#endif
//
// Note that GLIBC is a bit inconsistent about whether int64_t is defined or not
@ -60,7 +71,7 @@
# include <stdint.h>
// There is a bug in Cygwin two _C macros
# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__)
# if defined(INTMAX_C) && defined(__CYGWIN__)
# undef INTMAX_C
# undef UINTMAX_C
# define INTMAX_C(c) c##LL
@ -367,12 +378,9 @@ namespace boost
#include <stddef.h>
#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)) \
|| (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \
|| defined(__CYGWIN__) \
|| defined(__CYGWIN__) || defined(__VXWORKS__) \
|| defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
|| defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || (defined(sun) && !defined(BOOST_HAS_STDINT_H)) || defined(INTPTR_MAX)
@ -393,8 +401,6 @@ namespace boost {
#endif
#endif // !defined(__PGIC__)
#endif // BOOST_CSTDINT_HPP
@ -413,16 +419,6 @@ INT#_C macros if they're not already defined (John Maddock).
#if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \
(!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C))
//
// For the following code we get several warnings along the lines of:
//
// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant
//
// So we declare this a system header to suppress these warnings.
//
#if defined(__GNUC__) && (__GNUC__ >= 4)
#pragma GCC system_header
#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
//

View File

@ -39,7 +39,7 @@ protected:
typedef typename base_type::off_type off_type;
public:
basic_pointerbuf() : base_type() { setbuf(0, 0); }
basic_pointerbuf() : base_type() { this_type::setbuf(0, 0); }
const charT* getnext() { return this->gptr(); }
#ifndef BOOST_NO_USING_TEMPLATE

View File

@ -10,15 +10,21 @@
// William Kempf, Jesse Jones and Karl Nelson were all very helpful in the
// design of this library.
#ifndef BOOST_FUNCTION_MAX_ARGS
# define BOOST_FUNCTION_MAX_ARGS 10
#endif // BOOST_FUNCTION_MAX_ARGS
#if !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS)
#if !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED)
#define BOOST_FUNCTION_MAX_ARGS_DEFINED 0
#endif
#include <functional> // unary_function, binary_function
#include <boost/preprocessor/iterate.hpp>
#include <boost/detail/workaround.hpp>
#ifndef BOOST_FUNCTION_MAX_ARGS
# define BOOST_FUNCTION_MAX_ARGS 10
#endif // BOOST_FUNCTION_MAX_ARGS
// Include the prologue here so that the use of file-level iteration
// in anything that may be included by function_template.hpp doesn't break
#include <boost/function/detail/prologue.hpp>
@ -64,3 +70,5 @@
# include BOOST_PP_ITERATE()
# undef BOOST_PP_ITERATION_PARAMS_1
#endif
#endif // !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS)

View File

@ -27,6 +27,8 @@ for($on_arg = 0; $on_arg <= $max_args; ++$on_arg) {
print OUT "#elif";
}
print OUT " BOOST_FUNCTION_NUM_ARGS == $on_arg\n";
print OUT "# undef BOOST_FUNCTION_MAX_ARGS_DEFINED\n";
print OUT "# define BOOST_FUNCTION_MAX_ARGS_DEFINED $on_arg\n";
print OUT "# ifndef BOOST_FUNCTION_$on_arg\n";
print OUT "# define BOOST_FUNCTION_$on_arg\n";
print OUT "# include <boost/function/function_template.hpp>\n";

View File

@ -8,256 +8,358 @@
// For more information, see http://www.boost.org
#if BOOST_FUNCTION_NUM_ARGS == 0
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 0
# ifndef BOOST_FUNCTION_0
# define BOOST_FUNCTION_0
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 1
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 1
# ifndef BOOST_FUNCTION_1
# define BOOST_FUNCTION_1
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 2
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 2
# ifndef BOOST_FUNCTION_2
# define BOOST_FUNCTION_2
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 3
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 3
# ifndef BOOST_FUNCTION_3
# define BOOST_FUNCTION_3
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 4
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 4
# ifndef BOOST_FUNCTION_4
# define BOOST_FUNCTION_4
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 5
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 5
# ifndef BOOST_FUNCTION_5
# define BOOST_FUNCTION_5
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 6
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 6
# ifndef BOOST_FUNCTION_6
# define BOOST_FUNCTION_6
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 7
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 7
# ifndef BOOST_FUNCTION_7
# define BOOST_FUNCTION_7
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 8
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 8
# ifndef BOOST_FUNCTION_8
# define BOOST_FUNCTION_8
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 9
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 9
# ifndef BOOST_FUNCTION_9
# define BOOST_FUNCTION_9
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 10
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 10
# ifndef BOOST_FUNCTION_10
# define BOOST_FUNCTION_10
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 11
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 11
# ifndef BOOST_FUNCTION_11
# define BOOST_FUNCTION_11
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 12
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 12
# ifndef BOOST_FUNCTION_12
# define BOOST_FUNCTION_12
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 13
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 13
# ifndef BOOST_FUNCTION_13
# define BOOST_FUNCTION_13
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 14
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 14
# ifndef BOOST_FUNCTION_14
# define BOOST_FUNCTION_14
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 15
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 15
# ifndef BOOST_FUNCTION_15
# define BOOST_FUNCTION_15
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 16
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 16
# ifndef BOOST_FUNCTION_16
# define BOOST_FUNCTION_16
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 17
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 17
# ifndef BOOST_FUNCTION_17
# define BOOST_FUNCTION_17
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 18
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 18
# ifndef BOOST_FUNCTION_18
# define BOOST_FUNCTION_18
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 19
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 19
# ifndef BOOST_FUNCTION_19
# define BOOST_FUNCTION_19
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 20
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 20
# ifndef BOOST_FUNCTION_20
# define BOOST_FUNCTION_20
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 21
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 21
# ifndef BOOST_FUNCTION_21
# define BOOST_FUNCTION_21
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 22
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 22
# ifndef BOOST_FUNCTION_22
# define BOOST_FUNCTION_22
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 23
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 23
# ifndef BOOST_FUNCTION_23
# define BOOST_FUNCTION_23
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 24
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 24
# ifndef BOOST_FUNCTION_24
# define BOOST_FUNCTION_24
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 25
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 25
# ifndef BOOST_FUNCTION_25
# define BOOST_FUNCTION_25
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 26
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 26
# ifndef BOOST_FUNCTION_26
# define BOOST_FUNCTION_26
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 27
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 27
# ifndef BOOST_FUNCTION_27
# define BOOST_FUNCTION_27
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 28
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 28
# ifndef BOOST_FUNCTION_28
# define BOOST_FUNCTION_28
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 29
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 29
# ifndef BOOST_FUNCTION_29
# define BOOST_FUNCTION_29
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 30
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 30
# ifndef BOOST_FUNCTION_30
# define BOOST_FUNCTION_30
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 31
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 31
# ifndef BOOST_FUNCTION_31
# define BOOST_FUNCTION_31
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 32
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 32
# ifndef BOOST_FUNCTION_32
# define BOOST_FUNCTION_32
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 33
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 33
# ifndef BOOST_FUNCTION_33
# define BOOST_FUNCTION_33
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 34
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 34
# ifndef BOOST_FUNCTION_34
# define BOOST_FUNCTION_34
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 35
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 35
# ifndef BOOST_FUNCTION_35
# define BOOST_FUNCTION_35
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 36
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 36
# ifndef BOOST_FUNCTION_36
# define BOOST_FUNCTION_36
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 37
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 37
# ifndef BOOST_FUNCTION_37
# define BOOST_FUNCTION_37
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 38
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 38
# ifndef BOOST_FUNCTION_38
# define BOOST_FUNCTION_38
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 39
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 39
# ifndef BOOST_FUNCTION_39
# define BOOST_FUNCTION_39
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 40
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 40
# ifndef BOOST_FUNCTION_40
# define BOOST_FUNCTION_40
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 41
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 41
# ifndef BOOST_FUNCTION_41
# define BOOST_FUNCTION_41
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 42
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 42
# ifndef BOOST_FUNCTION_42
# define BOOST_FUNCTION_42
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 43
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 43
# ifndef BOOST_FUNCTION_43
# define BOOST_FUNCTION_43
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 44
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 44
# ifndef BOOST_FUNCTION_44
# define BOOST_FUNCTION_44
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 45
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 45
# ifndef BOOST_FUNCTION_45
# define BOOST_FUNCTION_45
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 46
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 46
# ifndef BOOST_FUNCTION_46
# define BOOST_FUNCTION_46
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 47
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 47
# ifndef BOOST_FUNCTION_47
# define BOOST_FUNCTION_47
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 48
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 48
# ifndef BOOST_FUNCTION_48
# define BOOST_FUNCTION_48
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 49
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 49
# ifndef BOOST_FUNCTION_49
# define BOOST_FUNCTION_49
# include <boost/function/function_template.hpp>
# endif
#elif BOOST_FUNCTION_NUM_ARGS == 50
# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
# define BOOST_FUNCTION_MAX_ARGS_DEFINED 50
# ifndef BOOST_FUNCTION_50
# define BOOST_FUNCTION_50
# include <boost/function/function_template.hpp>

View File

@ -438,9 +438,14 @@ namespace boost {
functor_manager_operation_type op, mpl::false_)
{
typedef functor_wrapper<Functor,Allocator> functor_wrapper_type;
#if defined(BOOST_NO_CXX11_ALLOCATOR)
typedef typename Allocator::template rebind<functor_wrapper_type>::other
wrapper_allocator_type;
typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
#else
using wrapper_allocator_type = typename std::allocator_traits<Allocator>::template rebind_alloc<functor_wrapper_type>;
using wrapper_allocator_pointer_type = typename std::allocator_traits<wrapper_allocator_type>::pointer;
#endif
if (op == clone_functor_tag) {
// Clone the functor
@ -450,7 +455,11 @@ namespace boost {
static_cast<const functor_wrapper_type*>(in_buffer.members.obj_ptr);
wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*f));
wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
#if defined(BOOST_NO_CXX11_ALLOCATOR)
wrapper_allocator.construct(copy, *f);
#else
std::allocator_traits<wrapper_allocator_type>::construct(wrapper_allocator, copy, *f);
#endif
// Get back to the original pointer type
functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
@ -463,7 +472,11 @@ namespace boost {
functor_wrapper_type* victim =
static_cast<functor_wrapper_type*>(in_buffer.members.obj_ptr);
wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*victim));
#if defined(BOOST_NO_CXX11_ALLOCATOR)
wrapper_allocator.destroy(victim);
#else
std::allocator_traits<wrapper_allocator_type>::destroy(wrapper_allocator, victim);
#endif
wrapper_allocator.deallocate(victim,1);
out_buffer.members.obj_ptr = 0;
} else if (op == check_functor_type_tag) {
@ -689,6 +702,10 @@ public: // should be protected, but GCC 2.95.3 will fail to allow access
mutable detail::function::function_buffer functor;
};
#if defined(BOOST_CLANG)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wweak-vtables"
#endif
/**
* The bad_function_call exception class is thrown when a boost::function
* object is invoked
@ -698,6 +715,9 @@ class bad_function_call : public std::runtime_error
public:
bad_function_call() : std::runtime_error("call to empty boost::function") {}
};
#if defined(BOOST_CLANG)
# pragma clang diagnostic pop
#endif
#ifndef BOOST_NO_SFINAE
inline bool operator==(const function_base& f,

View File

@ -590,12 +590,21 @@ namespace boost {
assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
{
typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
#if defined(BOOST_NO_CXX11_ALLOCATOR)
typedef typename Allocator::template rebind<functor_wrapper_type>::other
wrapper_allocator_type;
typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
#else
using wrapper_allocator_type = typename std::allocator_traits<Allocator>::template rebind_alloc<functor_wrapper_type>;
using wrapper_allocator_pointer_type = typename std::allocator_traits<wrapper_allocator_type>::pointer;
#endif
wrapper_allocator_type wrapper_allocator(a);
wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
#if defined(BOOST_NO_CXX11_ALLOCATOR)
wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
#else
std::allocator_traits<wrapper_allocator_type>::construct(wrapper_allocator, copy, functor_wrapper_type(f,a));
#endif
functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
functor.members.obj_ptr = new_f;
}
@ -895,7 +904,9 @@ namespace boost {
if (!f.empty()) {
this->vtable = f.vtable;
if (this->has_trivial_copy_and_destroy())
this->functor = f.functor;
// Don't operate on storage directly since union type doesn't relax
// strict aliasing rules, despite of having member char type.
std::memcpy(this->functor.data, f.functor.data, sizeof(boost::detail::function::function_buffer));
else
get_vtable()->base.manager(f.functor, this->functor,
boost::detail::function::clone_functor_tag);
@ -983,7 +994,9 @@ namespace boost {
if (!f.empty()) {
this->vtable = f.vtable;
if (this->has_trivial_copy_and_destroy())
this->functor = f.functor;
// Don't operate on storage directly since union type doesn't relax
// strict aliasing rules, despite of having member char type.
std::memcpy(this->functor.data, f.functor.data, sizeof(this->functor.data));
else
get_vtable()->base.manager(f.functor, this->functor,
boost::detail::function::move_functor_tag);

View File

@ -1,62 +1,14 @@
// (C) Copyright Jeremy Siek 2001.
// (C) Copyright Andrey Semashev 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)
// Revision History:
// 27 Feb 2001 Jeremy Siek
// Initial checkin.
#ifndef BOOST_FUNCTION_OUTPUT_ITERATOR_HPP
#define BOOST_FUNCTION_OUTPUT_ITERATOR_HPP
#include <iterator>
// This is a deprecated header left for backward compatibility.
// Use boost/iterator/function_output_iterator.hpp instead.
namespace boost {
namespace iterators {
template <class UnaryFunction>
class function_output_iterator {
typedef function_output_iterator self;
public:
typedef std::output_iterator_tag iterator_category;
typedef void value_type;
typedef void difference_type;
typedef void pointer;
typedef void reference;
explicit function_output_iterator() {}
explicit function_output_iterator(const UnaryFunction& f)
: m_f(f) {}
struct output_proxy {
output_proxy(UnaryFunction& f) : m_f(f) { }
template <class T> output_proxy& operator=(const T& value) {
m_f(value);
return *this;
}
UnaryFunction& m_f;
};
output_proxy operator*() { return output_proxy(m_f); }
self& operator++() { return *this; }
self& operator++(int) { return *this; }
private:
UnaryFunction m_f;
};
template <class UnaryFunction>
inline function_output_iterator<UnaryFunction>
make_function_output_iterator(const UnaryFunction& f = UnaryFunction()) {
return function_output_iterator<UnaryFunction>(f);
}
} // namespace iterators
using iterators::function_output_iterator;
using iterators::make_function_output_iterator;
} // namespace boost
#include <boost/iterator/function_output_iterator.hpp>
#endif // BOOST_FUNCTION_OUTPUT_ITERATOR_HPP

View File

@ -3,5 +3,4 @@
// 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>
#include <boost/container_hash/hash.hpp>

View File

@ -3,9 +3,4 @@
// 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/config.hpp>
#if defined(BOOST_HAS_PRAGMA_ONCE)
#pragma once
#endif
#include <boost/functional/hash/hash_fwd.hpp>
#include <boost/container_hash/hash_fwd.hpp>

View File

@ -1,20 +0,0 @@
// (C) Copyright Beman Dawes 2000. 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_ITERATOR_HPP
#define BOOST_ITERATOR_HPP
// This header is obsolete and will be deprecated.
#include <iterator>
#include <cstddef> // std::ptrdiff_t
namespace boost
{
using std::iterator;
} // namespace boost
#endif // BOOST_ITERATOR_HPP

View File

@ -0,0 +1,65 @@
// Copyright (C) 2017 Michel Morin.
//
// 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_ITERATOR_DISTANCE_HPP
#define BOOST_ITERATOR_DISTANCE_HPP
#include <boost/config.hpp>
#include <boost/iterator/iterator_categories.hpp>
#include <boost/iterator/iterator_traits.hpp>
namespace boost {
namespace iterators {
namespace detail {
template <typename SinglePassIterator>
inline BOOST_CXX14_CONSTEXPR typename iterator_difference<SinglePassIterator>::type
distance_impl(
SinglePassIterator first
, SinglePassIterator last
, single_pass_traversal_tag
)
{
typename iterator_difference<SinglePassIterator>::type n = 0;
while (first != last) {
++first;
++n;
}
return n;
}
template <typename RandomAccessIterator>
inline BOOST_CXX14_CONSTEXPR typename iterator_difference<RandomAccessIterator>::type
distance_impl(
RandomAccessIterator first
, RandomAccessIterator last
, random_access_traversal_tag
)
{
return last - first;
}
}
namespace distance_adl_barrier {
template <typename SinglePassIterator>
inline BOOST_CXX14_CONSTEXPR typename iterator_difference<SinglePassIterator>::type
distance(SinglePassIterator first, SinglePassIterator last)
{
return detail::distance_impl(
first, last, typename iterator_traversal<SinglePassIterator>::type()
);
}
}
using namespace distance_adl_barrier;
} // namespace iterators
using iterators::distance;
} // namespace boost
#endif

View File

@ -0,0 +1,62 @@
// (C) Copyright Jeremy Siek 2001.
// 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)
// Revision History:
// 27 Feb 2001 Jeremy Siek
// Initial checkin.
#ifndef BOOST_ITERATOR_FUNCTION_OUTPUT_ITERATOR_HPP
#define BOOST_ITERATOR_FUNCTION_OUTPUT_ITERATOR_HPP
#include <iterator>
namespace boost {
namespace iterators {
template <class UnaryFunction>
class function_output_iterator {
typedef function_output_iterator self;
public:
typedef std::output_iterator_tag iterator_category;
typedef void value_type;
typedef void difference_type;
typedef void pointer;
typedef void reference;
explicit function_output_iterator() {}
explicit function_output_iterator(const UnaryFunction& f)
: m_f(f) {}
struct output_proxy {
output_proxy(UnaryFunction& f) : m_f(f) { }
template <class T> output_proxy& operator=(const T& value) {
m_f(value);
return *this;
}
UnaryFunction& m_f;
};
output_proxy operator*() { return output_proxy(m_f); }
self& operator++() { return *this; }
self& operator++(int) { return *this; }
private:
UnaryFunction m_f;
};
template <class UnaryFunction>
inline function_output_iterator<UnaryFunction>
make_function_output_iterator(const UnaryFunction& f = UnaryFunction()) {
return function_output_iterator<UnaryFunction>(f);
}
} // namespace iterators
using iterators::function_output_iterator;
using iterators::make_function_output_iterator;
} // namespace boost
#endif // BOOST_ITERATOR_FUNCTION_OUTPUT_ITERATOR_HPP

View File

@ -8,8 +8,6 @@
#define BOOST_ITERATOR_ADAPTOR_23022003THW_HPP
#include <boost/static_assert.hpp>
#include <boost/iterator.hpp>
#include <boost/detail/iterator.hpp>
#include <boost/iterator/iterator_categories.hpp>
#include <boost/iterator/iterator_facade.hpp>

View File

@ -7,7 +7,6 @@
# define BOOST_ITERATOR_CATEGORIES_HPP
# include <boost/config.hpp>
# include <boost/detail/iterator.hpp>
# include <boost/iterator/detail/config_def.hpp>
# include <boost/detail/workaround.hpp>
@ -21,6 +20,8 @@
# include <boost/static_assert.hpp>
#include <iterator>
namespace boost {
namespace iterators {
@ -116,7 +117,7 @@ struct iterator_category_to_traversal
template <class Iterator = mpl::_1>
struct iterator_traversal
: iterator_category_to_traversal<
typename boost::detail::iterator_traits<Iterator>::iterator_category
typename std::iterator_traits<Iterator>::iterator_category
>
{};

View File

@ -9,9 +9,6 @@
#include <boost/concept_check.hpp>
#include <boost/iterator/iterator_categories.hpp>
// Use boost::detail::iterator_traits to work around some MSVC/Dinkumware problems.
#include <boost/detail/iterator.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/is_integral.hpp>
@ -27,6 +24,7 @@
#include <boost/config.hpp>
#include <algorithm>
#include <iterator>
#include <boost/concept/detail/concept_def.hpp>
@ -44,8 +42,8 @@ namespace boost_concepts
, boost::CopyConstructible<Iterator>
{
typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::value_type value_type;
typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::reference reference;
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::value_type value_type;
typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::reference reference;
BOOST_CONCEPT_USAGE(ReadableIterator)
{
@ -59,7 +57,7 @@ namespace boost_concepts
template <
typename Iterator
, typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::value_type
, typename ValueType = BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::value_type
>
struct WritableIterator
: boost::CopyConstructible<Iterator>
@ -75,7 +73,7 @@ namespace boost_concepts
template <
typename Iterator
, typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::value_type
, typename ValueType = BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::value_type
>
struct WritableIteratorConcept : WritableIterator<Iterator,ValueType> {};
@ -92,7 +90,7 @@ namespace boost_concepts
BOOST_concept(LvalueIterator,(Iterator))
{
typedef typename boost::detail::iterator_traits<Iterator>::value_type value_type;
typedef typename std::iterator_traits<Iterator>::value_type value_type;
BOOST_CONCEPT_USAGE(LvalueIterator)
{
@ -144,7 +142,7 @@ namespace boost_concepts
: SinglePassIterator<Iterator>
, boost::DefaultConstructible<Iterator>
{
typedef typename boost::detail::iterator_traits<Iterator>::difference_type difference_type;
typedef typename std::iterator_traits<Iterator>::difference_type difference_type;
BOOST_MPL_ASSERT((boost::is_integral<difference_type>));
BOOST_MPL_ASSERT_RELATION(std::numeric_limits<difference_type>::is_signed, ==, true);
@ -221,7 +219,7 @@ namespace boost_concepts
boost::random_access_traversal_tag, boost::random_access_traversal_tag)
{
bool b;
typename boost::detail::iterator_traits<Iterator2>::difference_type n;
typename std::iterator_traits<Iterator2>::difference_type n;
b = i1 < i2;
b = i1 <= i2;
b = i1 > i2;

View File

@ -8,7 +8,6 @@
#define BOOST_ITERATOR_FACADE_23022003THW_HPP
#include <boost/config.hpp>
#include <boost/iterator.hpp>
#include <boost/iterator/interoperable.hpp>
#include <boost/iterator/iterator_traits.hpp>
#include <boost/iterator/iterator_categories.hpp>
@ -37,6 +36,8 @@
#include <boost/mpl/apply.hpp>
#include <boost/mpl/identity.hpp>
#include <cstddef>
#include <boost/iterator/detail/config_def.hpp> // this goes last
namespace boost {

View File

@ -5,9 +5,10 @@
#ifndef ITERATOR_TRAITS_DWA200347_HPP
# define ITERATOR_TRAITS_DWA200347_HPP
# include <boost/detail/iterator.hpp>
# include <boost/detail/workaround.hpp>
#include <iterator>
namespace boost {
namespace iterators {
@ -19,32 +20,32 @@ namespace iterators {
template <class Iterator>
struct iterator_value
{
typedef typename boost::detail::iterator_traits<Iterator>::value_type type;
typedef typename std::iterator_traits<Iterator>::value_type type;
};
template <class Iterator>
struct iterator_reference
{
typedef typename boost::detail::iterator_traits<Iterator>::reference type;
typedef typename std::iterator_traits<Iterator>::reference type;
};
template <class Iterator>
struct iterator_pointer
{
typedef typename boost::detail::iterator_traits<Iterator>::pointer type;
typedef typename std::iterator_traits<Iterator>::pointer type;
};
template <class Iterator>
struct iterator_difference
{
typedef typename boost::detail::iterator_traits<Iterator>::difference_type type;
typedef typename std::iterator_traits<Iterator>::difference_type type;
};
template <class Iterator>
struct iterator_category
{
typedef typename boost::detail::iterator_traits<Iterator>::iterator_category type;
typedef typename std::iterator_traits<Iterator>::iterator_category type;
};
} // namespace iterators

View File

@ -7,7 +7,6 @@
#ifndef BOOST_REVERSE_ITERATOR_23022003THW_HPP
#define BOOST_REVERSE_ITERATOR_23022003THW_HPP
#include <boost/iterator.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
namespace boost {

View File

@ -200,18 +200,18 @@ namespace boost {
}
#endif
bool shl_char_array(CharT const* str) BOOST_NOEXCEPT {
start = str;
finish = start + Traits::length(str);
bool shl_char_array(CharT const* str_value) BOOST_NOEXCEPT {
start = str_value;
finish = start + Traits::length(str_value);
return true;
}
template <class T>
bool shl_char_array(T const* str) {
bool shl_char_array(T const* str_value) {
BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)),
"boost::lexical_cast does not support narrowing of char types."
"Use boost::locale instead" );
return shl_input_streamable(str);
return shl_input_streamable(str_value);
}
bool shl_char_array_limited(CharT const* str, std::size_t max_size) BOOST_NOEXCEPT {
@ -424,8 +424,8 @@ namespace boost {
bool operator<<(unsigned char * ch) { return ((*this) << reinterpret_cast<char *>(ch)); }
bool operator<<(signed char const* ch) { return ((*this) << reinterpret_cast<char const*>(ch)); }
bool operator<<(signed char * ch) { return ((*this) << reinterpret_cast<char *>(ch)); }
bool operator<<(char const* str) { return shl_char_array(str); }
bool operator<<(char* str) { return shl_char_array(str); }
bool operator<<(char const* str_value) { return shl_char_array(str_value); }
bool operator<<(char* str_value) { return shl_char_array(str_value); }
bool operator<<(short n) { return shl_signed(n); }
bool operator<<(int n) { return shl_signed(n); }
bool operator<<(long n) { return shl_signed(n); }

View File

@ -1,28 +0,0 @@
// Boost common_factor_ct.hpp header file ----------------------------------//
// (C) Copyright John Maddock 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 for updates, documentation, and revision history.
#ifndef BOOST_MATH_COMMON_FACTOR_CT_HPP
#define BOOST_MATH_COMMON_FACTOR_CT_HPP
#include <boost/integer/common_factor_ct.hpp>
namespace boost
{
namespace math
{
using boost::integer::static_gcd;
using boost::integer::static_lcm;
using boost::integer::static_gcd_type;
} // namespace math
} // namespace boost
#endif // BOOST_MATH_COMMON_FACTOR_CT_HPP

View File

@ -556,7 +556,8 @@ struct select_native<long double>
&& !defined(__FAST_MATH__)\
&& !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)\
&& !defined(BOOST_INTEL)\
&& !defined(sun)
&& !defined(sun)\
&& !defined(__VXWORKS__)
# define BOOST_MATH_USE_STD_FPCLASSIFY
#endif

View File

@ -263,6 +263,30 @@ namespace boost
typename tools::promote_args<T1, T2, T3>::type
hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
template<class T1, class T2, class T3>
typename tools::promote_args<T1, T2, T3>::type chebyshev_next(T1 const & x, T2 const & Tn, T3 const & Tn_1);
template <class Real, class Policy>
typename tools::promote_args<Real>::type
chebyshev_t(unsigned n, Real const & x, const Policy&);
template<class Real>
typename tools::promote_args<Real>::type chebyshev_t(unsigned n, Real const & x);
template <class Real, class Policy>
typename tools::promote_args<Real>::type
chebyshev_u(unsigned n, Real const & x, const Policy&);
template<class Real>
typename tools::promote_args<Real>::type chebyshev_u(unsigned n, Real const & x);
template <class Real, class Policy>
typename tools::promote_args<Real>::type
chebyshev_t_prime(unsigned n, Real const & x, const Policy&);
template<class Real>
typename tools::promote_args<Real>::type chebyshev_t_prime(unsigned n, Real const & x);
template<class Real, class T2>
Real chebyshev_clenshaw_recurrence(const Real* const c, size_t length, const T2& x);
template <class T1, class T2>
std::complex<typename tools::promote_args<T1, T2>::type>
spherical_harmonic(unsigned n, int m, T1 theta, T2 phi);
@ -1033,7 +1057,7 @@ namespace boost
typename tools::promote_args<T, U>::type epsilon_difference(const T&, const U&);
template<class T>
T unchecked_bernoulli_b2n(const std::size_t n);
BOOST_MATH_CONSTEXPR_TABLE_FUNCTION T unchecked_bernoulli_b2n(const std::size_t n);
template <class T, class Policy>
T bernoulli_b2n(const int i, const Policy &pol);
template <class T>
@ -1189,6 +1213,19 @@ namespace boost
hermite(unsigned n, T x){ return ::boost::math::hermite(n, x, Policy()); }\
\
using boost::math::hermite_next;\
\
using boost::math::chebyshev_next;\
\
template<class Real>\
Real chebyshev_t(unsigned n, Real const & x){ return ::boost::math::chebyshev_t(n, x, Policy()); }\
\
template<class Real>\
Real chebyshev_u(unsigned n, Real const & x){ return ::boost::math::chebyshev_u(n, x, Policy()); }\
\
template<class Real>\
Real chebyshev_t_prime(unsigned n, Real const & x){ return ::boost::math::chebyshev_t_prime(n, x, Policy()); }\
\
using ::boost::math::chebyshev_clenshaw_recurrence;\
\
template <class T1, class T2>\
inline std::complex<typename boost::math::tools::promote_args<T1, T2>::type> \

View File

@ -31,7 +31,7 @@
#if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \
|| (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \
&& !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
//# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
#endif
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
//
@ -209,7 +209,7 @@
// constexpr support, early GCC implementations can't cope so disable
// constexpr for them:
//
#if !defined(__clang) && defined(__GNUC__)
#if !defined(__clang__) && defined(__GNUC__)
#if (__GNUC__ * 100 + __GNUC_MINOR__) < 490
# define BOOST_MATH_DISABLE_CONSTEXPR
#endif
@ -451,6 +451,17 @@ namespace boost{ namespace math{
# define BOOST_MATH_THREAD_LOCAL
#endif
//
// Can we have constexpr tables?
//
#if (!defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_CXX14_CONSTEXPR)) || BOOST_WORKAROUND(BOOST_MSVC, >= 1910)
#define BOOST_MATH_HAVE_CONSTEXPR_TABLES
#define BOOST_MATH_CONSTEXPR_TABLE_FUNCTION constexpr
#else
#define BOOST_MATH_CONSTEXPR_TABLE_FUNCTION
#endif
#endif // BOOST_MATH_TOOLS_CONFIG_HPP

View File

@ -261,6 +261,12 @@ BidirIt2 adl_move_swap_ranges_backward(BidirIt1 first1, BidirIt1 last1, BidirIt2
return last2;
}
template<class ForwardIt1, class ForwardIt2>
void adl_move_iter_swap(ForwardIt1 a, ForwardIt2 b)
{
boost::adl_move_swap(*a, *b);
}
} //namespace boost{
#endif //#ifndef BOOST_MOVE_ADL_MOVE_SWAP_HPP

View File

@ -57,22 +57,10 @@
#include <boost/move/detail/type_traits.hpp>
#if defined(BOOST_MOVE_ADDRESS_SANITIZER_ON)
#define BOOST_MOVE_TO_RV_CAST(RV_TYPE, ARG) reinterpret_cast<RV_TYPE>(ARG)
#else
#define BOOST_MOVE_TO_RV_CAST(RV_TYPE, ARG) static_cast<RV_TYPE>(ARG)
#endif
#define BOOST_MOVE_TO_RV_CAST(RV_TYPE, ARG) reinterpret_cast<RV_TYPE>(ARG)
//Move emulation rv breaks standard aliasing rules so add workarounds for some compilers
#if defined(__GNUC__) && (__GNUC__ >= 4) && \
(\
defined(BOOST_GCC) || \
(defined(BOOST_INTEL) && (BOOST_INTEL_CXX_VERSION >= 1300)) \
)
#define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS __attribute__((__may_alias__))
#else
#define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS
#endif
#define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS BOOST_MAY_ALIAS
namespace boost {

View File

@ -967,14 +967,13 @@ typedef union max_align max_align_t;
#if !defined(BOOST_NO_ALIGNMENT)
template<std::size_t Len, std::size_t Align>
struct aligned_storage_impl;
struct aligned_struct;
#define BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(A)\
template<std::size_t Len>\
struct BOOST_ALIGNMENT(A) aligned_storage_impl<Len, A>\
struct BOOST_ALIGNMENT(A) aligned_struct<Len, A>\
{\
char dummy[Len];\
typedef aligned_storage_impl<Len, A> type;\
char data[Len];\
};\
//
@ -995,13 +994,28 @@ BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1000)
#undef BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT
// Workaround for bogus [-Wignored-attributes] warning on GCC 6.x/7.x: don't use a type that "directly" carries the alignment attribute.
// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82270
template<std::size_t Len, std::size_t Align>
union aligned_struct_wrapper
{
aligned_struct<Len, Align> aligner;
char data[sizeof(aligned_struct<Len, Align>)];
};
template<std::size_t Len, std::size_t Align>
struct aligned_storage_impl
{
typedef aligned_struct_wrapper<Len, Align> type;
};
#else //BOOST_NO_ALIGNMENT
template<class T, std::size_t Len>
union aligned_union
{
T aligner;
char dummy[Len];
char data[Len];
};
template<std::size_t Len, std::size_t Align, class T, bool Ok>

View File

@ -56,7 +56,7 @@
// and GCC (which issues "unused variable" warnings when static constants are used
// at a function scope)
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|| (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0)
|| (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0) || defined(__PGI)
# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
#else
# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr)
@ -184,16 +184,27 @@ template< typename P > struct assert_arg_pred_not
typedef typename assert_arg_pred_impl<p>::type type;
};
#if defined(BOOST_GCC) && BOOST_GCC >= 80000
#define BOOST_MPL_IGNORE_PARENTHESES_WARNING
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wparentheses"
#endif
template< typename Pred >
failed ************ (Pred::************
failed ************ (Pred::************
assert_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type )
);
template< typename Pred >
failed ************ (boost::mpl::not_<Pred>::************
failed ************ (boost::mpl::not_<Pred>::************
assert_not_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type )
);
#ifdef BOOST_MPL_IGNORE_PARENTHESES_WARNING
#undef BOOST_MPL_IGNORE_PARENTHESES_WARNING
#pragma GCC diagnostic pop
#endif
template< typename Pred >
AUX778076_ASSERT_ARG(assert<false>)
assert_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type );

View File

@ -46,19 +46,34 @@ namespace next_prior_detail {
// Since C++17 we can test for iterator_traits<T>::iterator_category presence instead as it is
// required to be only present for iterators.
template< typename T, typename Void = void >
struct is_iterator
struct is_iterator_class
{
static BOOST_CONSTEXPR_OR_CONST bool value = false;
};
template< typename T >
struct is_iterator< T, typename enable_if_has_type< typename T::iterator_category >::type >
struct is_iterator_class<
T,
typename enable_if_has_type<
#if !defined(BOOST_NO_CXX17_ITERATOR_TRAITS)
typename std::iterator_traits< T >::iterator_category
#else
typename T::iterator_category
#endif
>::type
>
{
static BOOST_CONSTEXPR_OR_CONST bool value = true;
};
template< typename T >
struct is_iterator< T*, void >
struct is_iterator :
public is_iterator_class< T >
{
};
template< typename T >
struct is_iterator< T* >
{
static BOOST_CONSTEXPR_OR_CONST bool value = true;
};

View File

@ -23,7 +23,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
# include<boost/numeric/conversion/detail/old_numeric_cast.hpp>

View File

@ -21,13 +21,6 @@ template<class T, class S>
struct conversion_traits
: convdetail::get_conversion_traits<T,S>::type
{
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
typedef typename convdetail::get_conversion_traits<T,S>::type base_;
typedef typename base_::target_type target_type;
typedef typename base_::source_type source_type;
typedef typename base_::result_type result_type;
typedef typename base_::argument_type argument_type;
#endif
} ;
} } // namespace boost::numeric

View File

@ -450,13 +450,10 @@ namespace boost { namespace numeric { namespace convdetail
// Trivial Converter : used when (cv-unqualified) T == (cv-unqualified) S
//
template<class Traits>
struct trivial_converter_impl : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type
,BOOST_DEDUCED_TYPENAME Traits::result_type
>
,public dummy_range_checker<Traits>
struct trivial_converter_impl : public dummy_range_checker<Traits>
{
typedef Traits traits ;
typedef typename Traits::source_type source_type ;
typedef typename Traits::argument_type argument_type ;
typedef typename Traits::result_type result_type ;
@ -471,10 +468,7 @@ namespace boost { namespace numeric { namespace convdetail
// Rounding Converter : used for float to integral conversions.
//
template<class Traits,class RangeChecker,class RawConverter,class Float2IntRounder>
struct rounding_converter : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type
,BOOST_DEDUCED_TYPENAME Traits::result_type
>
,public RangeChecker
struct rounding_converter : public RangeChecker
,public Float2IntRounder
,public RawConverter
{
@ -501,10 +495,7 @@ namespace boost { namespace numeric { namespace convdetail
// Non-Rounding Converter : used for all other conversions.
//
template<class Traits,class RangeChecker,class RawConverter>
struct non_rounding_converter : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type
,BOOST_DEDUCED_TYPENAME Traits::result_type
>
,public RangeChecker
struct non_rounding_converter : public RangeChecker
,public RawConverter
{
typedef RangeChecker RangeCheckerBase ;

37
3rdparty/boost/boost/numeric/conversion/detail/old_numeric_cast.hpp vendored Executable file → Normal file
View File

@ -8,6 +8,8 @@
// See http://www.boost.org/libs/conversion for Documentation.
// Revision History
// 02 Jun 14 Remove VC6 workarounds.
// 16 Jul 11 Bugfixes for VC6.
// 23 JUN 05 Code extracted from /boost/cast.hpp into this new header.
// Keeps this legacy version of numeric_cast<> for old compilers
// wich can't compile the new version in /boost/numeric/conversion/cast.hpp
@ -53,19 +55,6 @@
# include <boost/limits.hpp>
# include <boost/numeric/conversion/converter_policies.hpp>
// It has been demonstrated numerous times that MSVC 6.0 fails silently at link
// time if you use a template function which has template parameters that don't
// appear in the function's argument list.
//
// TODO: Add this to config.hpp?
// FLC: This macro is repeated in boost/cast.hpp but only locally (is undefined at the bottom)
// so is OK to reproduce it here.
# if defined(BOOST_MSVC) && BOOST_MSVC < 1300
# define BOOST_EXPLICIT_DEFAULT_TARGET , ::boost::type<Target>* = 0
# else
# define BOOST_EXPLICIT_DEFAULT_TARGET
# endif
namespace boost
{
using numeric::bad_numeric_cast;
@ -214,24 +203,6 @@ namespace boost
template <class X, class Y>
static inline bool check(X x, Y)
{ return x >= 0 && static_cast<X>(static_cast<Y>(x)) != x; }
# if defined(BOOST_MSVC) && BOOST_MSVC < 1300
// MSVC6 can't static_cast unsigned __int64 -> floating types
# define BOOST_UINT64_CAST(src_type) \
static inline bool check(src_type x, unsigned __int64) \
{ \
if (x < 0) return false; \
unsigned __int64 y = static_cast<unsigned __int64>(x); \
bool odd = y & 0x1; \
__int64 div2 = static_cast<__int64>(y >> 1); \
return ((static_cast<src_type>(div2) * 2.0) + odd) != x; \
}
BOOST_UINT64_CAST(long double);
BOOST_UINT64_CAST(double);
BOOST_UINT64_CAST(float);
# undef BOOST_UINT64_CAST
# endif
};
template<>
@ -285,7 +256,7 @@ namespace boost
#endif
template<typename Target, typename Source>
inline Target numeric_cast(Source arg BOOST_EXPLICIT_DEFAULT_TARGET)
inline Target numeric_cast(Source arg)
{
// typedefs abbreviating respective trait classes
typedef detail::fixed_numeric_limits<Source> arg_traits;
@ -332,8 +303,6 @@ namespace boost
return static_cast<Target>(arg);
} // numeric_cast
# undef BOOST_EXPLICIT_DEFAULT_TARGET
} // namespace boost
#endif // BOOST_OLD_NUMERIC_CAST_HPP

View File

@ -147,7 +147,7 @@ class optional_base : public optional_tag
}
#endif
// Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialzed optional<T>.
// Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional<T>.
// Can throw if T::T(T const&) does
optional_base ( bool cond, argument_type val )
:
@ -730,7 +730,7 @@ class optional : public optional_detail::optional_base<T>
explicit optional ( Expr&& expr,
BOOST_DEDUCED_TYPENAME boost::disable_if_c<
(boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type>::value) ||
boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type, none_t>::value >::type* = 0
boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type, none_t>::value, bool >::type = true
)
: base(boost::forward<Expr>(expr),boost::addressof(expr))
{optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, Expr&&>();}
@ -746,12 +746,12 @@ class optional : public optional_detail::optional_base<T>
optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {}
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Creates a deep move of another optional<T>
// Can throw if T::T(T&&) does
optional ( optional && rhs )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
: base( boost::move(rhs) )
{}
// Creates a deep move of another optional<T>
// Can throw if T::T(T&&) does
optional ( optional && rhs )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
: base( boost::move(rhs) )
{}
#endif
// No-throw (assuming T::~T() doesn't)
@ -819,7 +819,7 @@ class optional : public optional_detail::optional_base<T>
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Assigns from another optional<T> (deep-moves the rhs value)
optional& operator= ( optional && rhs )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
{
this->assign( static_cast<base &&>(rhs) ) ;
return *this ;
@ -892,7 +892,7 @@ class optional : public optional_detail::optional_base<T>
#endif
void swap( optional & arg )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
{
// allow for Koenig lookup
boost::swap(*this, arg);

View File

@ -25,12 +25,8 @@ template <class T>
class aligned_storage
{
// Borland ICEs if unnamed unions are used for this!
union
// This works around GCC warnings about breaking strict aliasing rules when casting storage address to T*
#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
__attribute__((__may_alias__))
#endif
dummy_u
// BOOST_MAY_ALIAS works around GCC warnings about breaking strict aliasing rules when casting storage address to T*
union BOOST_MAY_ALIAS dummy_u
{
char data[ sizeof(T) ];
BOOST_DEDUCED_TYPENAME type_with_alignment<
@ -48,24 +44,24 @@ class aligned_storage
#endif
#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
// This workaround is supposed to silence GCC warnings about broken strict aliasing rules
T const* ptr_ref() const
{
union { void const* ap_pvoid; T const* as_ptype; } caster = { address() };
return caster.as_ptype;
}
T * ptr_ref()
{
union { void* ap_pvoid; T* as_ptype; } caster = { address() };
return caster.as_ptype;
}
// This workaround is supposed to silence GCC warnings about broken strict aliasing rules
T const* ptr_ref() const
{
union { void const* ap_pvoid; T const* as_ptype; } caster = { address() };
return caster.as_ptype;
}
T * ptr_ref()
{
union { void* ap_pvoid; T* as_ptype; } caster = { address() };
return caster.as_ptype;
}
#else
T const* ptr_ref() const { return static_cast<T const*>(address()); }
T * ptr_ref() { return static_cast<T *> (address()); }
T const* ptr_ref() const { return static_cast<T const*>(address()); }
T * ptr_ref() { return static_cast<T *> (address()); }
#endif
T const& ref() const { return *ptr_ref(); }
T & ref() { return *ptr_ref(); }
T const& ref() const { return *ptr_ref(); }
T & ref() { return *ptr_ref(); }
} ;

View File

@ -1,5 +1,5 @@
// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
// Copyright (C) 2015 Andrzej Krzemienski.
// Copyright (C) 2015 - 2017 Andrzej Krzemienski.
//
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@ -44,11 +44,11 @@
# define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
#endif
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
// GCC since 3.3 has may_alias attribute that helps to alleviate optimizer issues with
// regard to violation of the strict aliasing rules. The optional< T > storage type is marked
// with this attribute in order to let the compiler know that it will alias objects of type T
// and silence compilation warnings.
#if !defined(BOOST_NO_MAY_ALIAS)
// GCC since 3.3 and some other compilers have may_alias attribute that helps to alleviate
// optimizer issues with regard to violation of the strict aliasing rules. The optional< T >
// storage type is marked with this attribute in order to let the compiler know that it will
// alias objects of type T and silence compilation warnings.
# define BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS
#endif
@ -113,4 +113,23 @@
# define BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
#endif
// Detect suport for defaulting move operations
// (some older compilers implement rvalue references,
// defaulted funcitons but move operations are not special members and cannot be defaulted)
#ifdef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
# define BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
#elif BOOST_WORKAROUND(BOOST_MSVC, < 1900)
# define BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
#elif BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40600)
# define BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
#endif
#ifdef BOOST_OPTIONAL_CONFIG_NO_DIRECT_STORAGE_SPEC
# define BOOST_OPTIONAL_DETAIL_NO_DIRECT_STORAGE_SPEC
#endif
#endif // header guard

View File

@ -1,4 +1,4 @@
// Copyright (C) 2015-2016 Andrzej Krzemienski.
// Copyright (C) 2015-2018 Andrzej Krzemienski.
//
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@ -132,11 +132,11 @@ public:
// the following two implement a 'conditionally explicit' constructor: condition is a hack for buggy compilers with srewed conversion construction from const int
template <class U>
explicit optional(U& rhs, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::is_same_decayed<T, U>::value && detail::is_const_integral_bad_for_conversion<U>::value>::type* = 0) BOOST_NOEXCEPT
explicit optional(U& rhs, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::is_same_decayed<T, U>::value && detail::is_const_integral_bad_for_conversion<U>::value, bool>::type = true) BOOST_NOEXCEPT
: ptr_(boost::addressof(rhs)) {}
template <class U>
optional(U& rhs, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::is_same_decayed<T, U>::value && !detail::is_const_integral_bad_for_conversion<U>::value>::type* = 0) BOOST_NOEXCEPT
optional(U& rhs, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::is_same_decayed<T, U>::value && !detail::is_const_integral_bad_for_conversion<U>::value, bool>::type = true) BOOST_NOEXCEPT
: ptr_(boost::addressof(rhs)) {}
optional& operator=(const optional& rhs) BOOST_NOEXCEPT { ptr_ = rhs.get_ptr(); return *this; }
@ -159,17 +159,36 @@ public:
void reset() BOOST_NOEXCEPT { ptr_ = 0; }
bool is_initialized() const BOOST_NOEXCEPT { return ptr_ != 0; }
bool has_value() const BOOST_NOEXCEPT { return ptr_ != 0; }
template <typename F>
optional<typename boost::result_of<F(T&)>::type> map(F f) const
{
if (this->has_value())
return f(this->get());
else
return none;
}
template <typename F>
optional<typename optional_detail::optional_value_type<typename boost::result_of<F(T&)>::type>::type> flat_map(F f) const
{
if (this->has_value())
return f(get());
else
return none;
}
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
optional(T&& /* rhs */) BOOST_NOEXCEPT { detail::prevent_binding_rvalue<T&&>(); }
template <class R>
optional(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::no_unboxing_cond<T, R> >::type* = 0) BOOST_NOEXCEPT
optional(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::no_unboxing_cond<T, R>, bool>::type = true) BOOST_NOEXCEPT
: ptr_(boost::addressof(r)) { detail::prevent_binding_rvalue<R>(); }
template <class R>
optional(bool cond, R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) BOOST_NOEXCEPT
optional(bool cond, R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R>, bool>::type = true) BOOST_NOEXCEPT
: ptr_(cond ? boost::addressof(r) : 0) { detail::prevent_binding_rvalue<R>(); }
template <class R>
@ -177,19 +196,19 @@ public:
operator=(R&& r) BOOST_NOEXCEPT { detail::prevent_binding_rvalue<R>(); ptr_ = boost::addressof(r); return *this; }
template <class R>
void emplace(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) BOOST_NOEXCEPT
void emplace(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R>, bool>::type = true) BOOST_NOEXCEPT
{ detail::prevent_binding_rvalue<R>(); ptr_ = boost::addressof(r); }
template <class R>
T& get_value_or(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) const BOOST_NOEXCEPT
T& get_value_or(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R>, bool>::type = true) const BOOST_NOEXCEPT
{ detail::prevent_binding_rvalue<R>(); return ptr_ ? *ptr_ : r; }
template <class R>
T& value_or(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) const BOOST_NOEXCEPT
T& value_or(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R>, bool>::type = true) const BOOST_NOEXCEPT
{ detail::prevent_binding_rvalue<R>(); return ptr_ ? *ptr_ : r; }
template <class R>
void reset(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) BOOST_NOEXCEPT
void reset(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R>, bool>::type = true) BOOST_NOEXCEPT
{ detail::prevent_binding_rvalue<R>(); ptr_ = boost::addressof(r); }
template <class F>
@ -200,15 +219,15 @@ public:
// the following two implement a 'conditionally explicit' constructor
template <class U>
explicit optional(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::no_unboxing_cond<T, U>::value && detail::is_const_integral_bad_for_conversion<U>::value >::type* = 0) BOOST_NOEXCEPT
explicit optional(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::no_unboxing_cond<T, U>::value && detail::is_const_integral_bad_for_conversion<U>::value, bool>::type = true) BOOST_NOEXCEPT
: ptr_(boost::addressof(v)) { }
template <class U>
optional(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::no_unboxing_cond<T, U>::value && !detail::is_const_integral_bad_for_conversion<U>::value >::type* = 0) BOOST_NOEXCEPT
optional(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::no_unboxing_cond<T, U>::value && !detail::is_const_integral_bad_for_conversion<U>::value, bool>::type = true) BOOST_NOEXCEPT
: ptr_(boost::addressof(v)) { }
template <class U>
optional(bool cond, U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) BOOST_NOEXCEPT : ptr_(cond ? boost::addressof(v) : 0) {}
optional(bool cond, U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U>, bool>::type = true) BOOST_NOEXCEPT : ptr_(cond ? boost::addressof(v) : 0) {}
template <class U>
BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U>, optional<T&>&>::type
@ -219,19 +238,19 @@ public:
}
template <class U>
void emplace(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) BOOST_NOEXCEPT
void emplace(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U>, bool>::type = true) BOOST_NOEXCEPT
{ ptr_ = boost::addressof(v); }
template <class U>
T& get_value_or(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) const BOOST_NOEXCEPT
T& get_value_or(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U>, bool>::type = true) const BOOST_NOEXCEPT
{ return ptr_ ? *ptr_ : v; }
template <class U>
T& value_or(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) const BOOST_NOEXCEPT
T& value_or(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U>, bool>::type = true) const BOOST_NOEXCEPT
{ return ptr_ ? *ptr_ : v; }
template <class U>
void reset(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) BOOST_NOEXCEPT
void reset(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U>, bool>::type = true) BOOST_NOEXCEPT
{ ptr_ = boost::addressof(v); }
template <class F>

View File

@ -26,7 +26,7 @@ namespace boost {
template<class T>
inline
bool operator == ( optional<T> const& x, optional<T> const& y )
{ return equal_pointees(x,y); }
{ return bool(x) && bool(y) ? *x == *y : bool(x) == bool(y); }
template<class T>
inline

View File

@ -0,0 +1,499 @@
// trivilally-copyable version of the storage
template<class T>
class tc_optional_base : public optional_tag
{
private :
typedef tc_optional_base<T> this_type ;
protected :
typedef T value_type ;
protected:
typedef T & reference_type ;
typedef T const& reference_const_type ;
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
typedef T && rval_reference_type ;
typedef T && reference_type_of_temporary_wrapper ;
#endif
typedef T * pointer_type ;
typedef T const* pointer_const_type ;
typedef T const& argument_type ;
tc_optional_base()
:
m_initialized(false) {}
tc_optional_base ( none_t )
:
m_initialized(false) {}
tc_optional_base ( argument_type val )
:
m_initialized(true), m_storage(val) {}
tc_optional_base ( bool cond, argument_type val )
:
m_initialized(cond), m_storage(val) {}
// tc_optional_base ( tc_optional_base const& ) = default;
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
template<class Expr, class PtrExpr>
explicit tc_optional_base ( Expr&& expr, PtrExpr const* tag )
:
m_initialized(false)
{
construct(boost::forward<Expr>(expr),tag);
}
#else
// This is used for both converting and in-place constructions.
// Derived classes use the 'tag' to select the appropriate
// implementation (the correct 'construct()' overload)
template<class Expr>
explicit tc_optional_base ( Expr const& expr, Expr const* tag )
:
m_initialized(false)
{
construct(expr,tag);
}
#endif
// tc_optional_base& operator= ( tc_optional_base const& ) = default;
// ~tc_optional_base() = default;
// Assigns from another optional<T> (deep-copies the rhs value)
void assign ( tc_optional_base const& rhs )
{
this->operator=(rhs);
}
// Assigns from another _convertible_ optional<U> (deep-copies the rhs value)
template<class U>
void assign ( optional<U> const& rhs )
{
if ( rhs.is_initialized() )
#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
m_storage = rhs.get();
#else
m_storage = static_cast<value_type>(rhs.get());
#endif
m_initialized = rhs.is_initialized();
}
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// move-assigns from another _convertible_ optional<U> (deep-moves from the rhs value)
template<class U>
void assign ( optional<U>&& rhs )
{
typedef BOOST_DEDUCED_TYPENAME optional<U>::rval_reference_type ref_type;
if ( rhs.is_initialized() )
m_storage = static_cast<ref_type>(rhs.get());
m_initialized = rhs.is_initialized();
}
#endif
void assign ( argument_type val )
{
construct(val);
}
void assign ( none_t ) { destroy(); }
#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
template<class Expr, class ExprPtr>
void assign_expr ( Expr&& expr, ExprPtr const* tag )
{
construct(boost::forward<Expr>(expr),tag);
}
#else
template<class Expr>
void assign_expr ( Expr const& expr, Expr const* tag )
{
construct(expr,tag);
}
#endif
#endif
public :
// **DEPPRECATED** Destroys the current value, if any, leaving this UNINITIALIZED
// No-throw (assuming T::~T() doesn't)
void reset() BOOST_NOEXCEPT { destroy(); }
// **DEPPRECATED** Replaces the current value -if any- with 'val'
void reset ( argument_type val ) BOOST_NOEXCEPT { assign(val); }
// Returns a pointer to the value if this is initialized, otherwise,
// returns NULL.
// No-throw
pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; }
pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; }
bool is_initialized() const { return m_initialized ; }
protected :
void construct ( argument_type val )
{
m_storage = val ;
m_initialized = true ;
}
#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
// Constructs in-place
// upon exception *this is always uninitialized
template<class... Args>
void construct ( in_place_init_t, Args&&... args )
{
m_storage = value_type( boost::forward<Args>(args)... ) ;
m_initialized = true ;
}
template<class... Args>
void emplace_assign ( Args&&... args )
{
construct(in_place_init, boost::forward<Args>(args)...);
}
template<class... Args>
explicit tc_optional_base ( in_place_init_t, Args&&... args )
:
m_initialized(false)
{
construct(in_place_init, boost::forward<Args>(args)...);
}
template<class... Args>
explicit tc_optional_base ( in_place_init_if_t, bool cond, Args&&... args )
:
m_initialized(false)
{
if ( cond )
construct(in_place_init, boost::forward<Args>(args)...);
}
#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
template<class Arg>
void construct ( in_place_init_t, Arg&& arg )
{
m_storage = value_type( boost::forward<Arg>(arg) );
m_initialized = true ;
}
void construct ( in_place_init_t )
{
m_storage = value_type();
m_initialized = true ;
}
template<class Arg>
void emplace_assign ( Arg&& arg )
{
construct(in_place_init, boost::forward<Arg>(arg)) ;
}
void emplace_assign ()
{
construct(in_place_init) ;
}
template<class Arg>
explicit tc_optional_base ( in_place_init_t, Arg&& arg )
:
m_initialized(false)
{
construct(in_place_init, boost::forward<Arg>(arg));
}
explicit tc_optional_base ( in_place_init_t )
:
m_initialized(false), m_storage() {}
template<class Arg>
explicit tc_optional_base ( in_place_init_if_t, bool cond, Arg&& arg )
:
m_initialized(false)
{
if ( cond )
construct(in_place_init, boost::forward<Arg>(arg));
}
explicit tc_optional_base ( in_place_init_if_t, bool cond )
:
m_initialized(false)
{
if ( cond )
construct(in_place_init);
}
#else
template<class Arg>
void construct ( in_place_init_t, const Arg& arg )
{
m_storage = value_type( arg );
m_initialized = true ;
}
template<class Arg>
void construct ( in_place_init_t, Arg& arg )
{
m_storage = value_type( arg );
m_initialized = true ;
}
void construct ( in_place_init_t )
{
m_storage = value_type();
m_initialized = true ;
}
template<class Arg>
void emplace_assign ( const Arg& arg )
{
construct(in_place_init, arg);
}
template<class Arg>
void emplace_assign ( Arg& arg )
{
construct(in_place_init, arg);
}
void emplace_assign ()
{
construct(in_place_init);
}
template<class Arg>
explicit tc_optional_base ( in_place_init_t, const Arg& arg )
: m_initialized(false)
{
construct(in_place_init, arg);
}
template<class Arg>
explicit tc_optional_base ( in_place_init_t, Arg& arg )
: m_initialized(false)
{
construct(in_place_init, arg);
}
explicit tc_optional_base ( in_place_init_t )
: m_initialized(false)
{
construct(in_place_init);
}
template<class Arg>
explicit tc_optional_base ( in_place_init_if_t, bool cond, const Arg& arg )
: m_initialized(false)
{
if ( cond )
construct(in_place_init, arg);
}
template<class Arg>
explicit tc_optional_base ( in_place_init_if_t, bool cond, Arg& arg )
: m_initialized(false)
{
if ( cond )
construct(in_place_init, arg);
}
explicit tc_optional_base ( in_place_init_if_t, bool cond )
: m_initialized(false)
{
if ( cond )
construct(in_place_init);
}
#endif
#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Constructs in-place using the given factory
template<class Expr>
void construct ( Expr&& factory, in_place_factory_base const* )
{
boost_optional_detail::construct<value_type>(factory, boost::addressof(m_storage));
m_initialized = true ;
}
// Constructs in-place using the given typed factory
template<class Expr>
void construct ( Expr&& factory, typed_in_place_factory_base const* )
{
factory.apply(boost::addressof(m_storage)) ;
m_initialized = true ;
}
template<class Expr>
void assign_expr_to_initialized ( Expr&& factory, in_place_factory_base const* tag )
{
destroy();
construct(factory,tag);
}
// Constructs in-place using the given typed factory
template<class Expr>
void assign_expr_to_initialized ( Expr&& factory, typed_in_place_factory_base const* tag )
{
destroy();
construct(factory,tag);
}
#else
// Constructs in-place using the given factory
template<class Expr>
void construct ( Expr const& factory, in_place_factory_base const* )
{
boost_optional_detail::construct<value_type>(factory, m_storage.address());
m_initialized = true ;
}
// Constructs in-place using the given typed factory
template<class Expr>
void construct ( Expr const& factory, typed_in_place_factory_base const* )
{
factory.apply(boost::addressof(m_storage)) ;
m_initialized = true ;
}
template<class Expr>
void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag )
{
destroy();
construct(factory,tag);
}
// Constructs in-place using the given typed factory
template<class Expr>
void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag )
{
destroy();
construct(factory,tag);
}
#endif
#endif
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Constructs using any expression implicitly convertible to the single argument
// of a one-argument T constructor.
// Converting constructions of optional<T> from optional<U> uses this function with
// 'Expr' being of type 'U' and relying on a converting constructor of T from U.
template<class Expr>
void construct ( Expr&& expr, void const* )
{
m_storage = value_type(boost::forward<Expr>(expr)) ;
m_initialized = true ;
}
// Assigns using a form any expression implicitly convertible to the single argument
// of a T's assignment operator.
// Converting assignments of optional<T> from optional<U> uses this function with
// 'Expr' being of type 'U' and relying on a converting assignment of T from U.
template<class Expr>
void assign_expr_to_initialized ( Expr&& expr, void const* )
{
assign_value( boost::forward<Expr>(expr) );
}
#else
// Constructs using any expression implicitly convertible to the single argument
// of a one-argument T constructor.
// Converting constructions of optional<T> from optional<U> uses this function with
// 'Expr' being of type 'U' and relying on a converting constructor of T from U.
template<class Expr>
void construct ( Expr const& expr, void const* )
{
m_storage = value_type(expr) ;
m_initialized = true ;
}
// Assigns using a form any expression implicitly convertible to the single argument
// of a T's assignment operator.
// Converting assignments of optional<T> from optional<U> uses this function with
// 'Expr' being of type 'U' and relying on a converting assignment of T from U.
template<class Expr>
void assign_expr_to_initialized ( Expr const& expr, void const* )
{
assign_value(expr);
}
#endif
#ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
// BCB5.64 (and probably lower versions) workaround.
// The in-place factories are supported by means of catch-all constructors
// and assignment operators (the functions are parameterized in terms of
// an arbitrary 'Expr' type)
// This compiler incorrectly resolves the overload set and sinks optional<T> and optional<U>
// to the 'Expr'-taking functions even though explicit overloads are present for them.
// Thus, the following overload is needed to properly handle the case when the 'lhs'
// is another optional.
//
// For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error
// instead of choosing the wrong overload
//
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Notice that 'Expr' will be optional<T> or optional<U> (but not tc_optional_base<..>)
template<class Expr>
void construct ( Expr&& expr, optional_tag const* )
{
if ( expr.is_initialized() )
{
// An exception can be thrown here.
// It it happens, THIS will be left uninitialized.
m_storage = value_type(boost::move(expr.get())) ;
m_initialized = true ;
}
}
#else
// Notice that 'Expr' will be optional<T> or optional<U> (but not tc_optional_base<..>)
template<class Expr>
void construct ( Expr const& expr, optional_tag const* )
{
if ( expr.is_initialized() )
{
// An exception can be thrown here.
// It it happens, THIS will be left uninitialized.
m_storage = value_type(expr.get()) ;
m_initialized = true ;
}
}
#endif
#endif // defined BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
void assign_value ( argument_type val ) { m_storage = val; }
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
void assign_value ( rval_reference_type val ) { m_storage = static_cast<rval_reference_type>(val); }
#endif
void destroy()
{
m_initialized = false;
}
reference_const_type get_impl() const { return m_storage ; }
reference_type get_impl() { return m_storage ; }
pointer_const_type get_ptr_impl() const { return boost::addressof(m_storage); }
pointer_type get_ptr_impl() { return boost::addressof(m_storage); }
private :
bool m_initialized ;
T m_storage ;
} ;

View File

@ -1,5 +1,5 @@
// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
// Copyright (C) 2014 - 2016 Andrzej Krzemienski.
// Copyright (C) 2014 - 2018 Andrzej Krzemienski.
//
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@ -20,6 +20,10 @@
#include <new>
#include <iosfwd>
#ifdef BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
# include <type_traits>
#endif
#include <boost/assert.hpp>
#include <boost/core/addressof.hpp>
#include <boost/core/enable_if.hpp>
@ -37,44 +41,63 @@
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/decay.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_constructible.hpp>
#include <boost/type_traits/is_lvalue_reference.hpp>
#include <boost/type_traits/is_nothrow_move_assignable.hpp>
#include <boost/type_traits/is_nothrow_move_constructible.hpp>
#include <boost/type_traits/is_rvalue_reference.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/is_volatile.hpp>
#include <boost/type_traits/is_scalar.hpp>
#include <boost/move/utility.hpp>
#include <boost/none.hpp>
#include <boost/utility/compare_pointees.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/optional/optional_fwd.hpp>
#include <boost/optional/detail/optional_config.hpp>
#include <boost/optional/detail/optional_factory_support.hpp>
#include <boost/optional/detail/optional_aligned_storage.hpp>
namespace boost { namespace optional_detail {
template <typename T>
struct optional_value_type
{
};
template <typename T>
struct optional_value_type< ::boost::optional<T> >
{
typedef T type;
};
}} // namespace boost::optional_detail
#ifdef BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
#include <boost/optional/detail/old_optional_implementation.hpp>
#else
namespace boost {
namespace optional_ns {
// a tag for in-place initialization of contained value
struct in_place_init_t
{
struct init_tag{};
explicit in_place_init_t(init_tag){}
};
};
const in_place_init_t in_place_init ((in_place_init_t::init_tag()));
// a tag for conditional in-place initialization of contained value
// a tag for conditional in-place initialization of contained value
struct in_place_init_if_t
{
struct init_tag{};
explicit in_place_init_if_t(init_tag){}
};
const in_place_init_if_t in_place_init_if ((in_place_init_if_t::init_tag()));
} // namespace optional_ns
using optional_ns::in_place_init_t;
@ -142,7 +165,7 @@ class optional_base : public optional_tag
}
#endif
// Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialzed optional<T>.
// Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional<T>.
// Can throw if T::T(T const&) does
optional_base ( bool cond, argument_type val )
:
@ -152,6 +175,18 @@ class optional_base : public optional_tag
construct(val);
}
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Creates an optional<T> initialized with 'move(val)' IFF cond is true, otherwise creates an uninitialized optional<T>.
// Can throw if T::T(T &&) does
optional_base ( bool cond, rval_reference_type val )
:
m_initialized(false)
{
if ( cond )
construct(boost::move(val));
}
#endif
// Creates a deep copy of another optional<T>
// Can throw if T::T(T const&) does
optional_base ( optional_base const& rhs )
@ -166,6 +201,7 @@ class optional_base : public optional_tag
// Creates a deep move of another optional<T>
// Can throw if T::T(T&&) does
optional_base ( optional_base&& rhs )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
:
m_initialized(false)
{
@ -198,6 +234,20 @@ class optional_base : public optional_tag
#endif
optional_base& operator= ( optional_base const& rhs )
{
this->assign(rhs);
return *this;
}
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
optional_base& operator= ( optional_base && rhs )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
{
this->assign(static_cast<optional_base&&>(rhs));
return *this;
}
#endif
// No-throw (assuming T::~T() doesn't)
~optional_base() { destroy() ; }
@ -217,7 +267,7 @@ class optional_base : public optional_tag
construct(rhs.get_impl());
}
}
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Assigns from another optional<T> (deep-moves the rhs value)
void assign ( optional_base&& rhs )
@ -234,7 +284,7 @@ class optional_base : public optional_tag
construct(boost::move(rhs.get_impl()));
}
}
#endif
#endif
// Assigns from another _convertible_ optional<U> (deep-copies the rhs value)
template<class U>
@ -248,7 +298,7 @@ class optional_base : public optional_tag
#else
assign_value( static_cast<value_type>(rhs.get()) );
#endif
else destroy();
}
else
@ -281,7 +331,7 @@ class optional_base : public optional_tag
}
}
#endif
// Assigns from a T (deep-copies the rhs value)
void assign ( argument_type val )
{
@ -289,7 +339,7 @@ class optional_base : public optional_tag
assign_value(val);
else construct(val);
}
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Assigns from a T (deep-moves the rhs value)
void assign ( rval_reference_type val )
@ -341,7 +391,7 @@ class optional_base : public optional_tag
pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; }
pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; }
bool is_initialized() const { return m_initialized ; }
bool is_initialized() const BOOST_NOEXCEPT { return m_initialized ; }
protected :
@ -350,7 +400,7 @@ class optional_base : public optional_tag
::new (m_storage.address()) value_type(val) ;
m_initialized = true ;
}
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
void construct ( rval_reference_type val )
{
@ -376,7 +426,7 @@ class optional_base : public optional_tag
destroy();
construct(in_place_init, boost::forward<Args>(args)...);
}
template<class... Args>
explicit optional_base ( in_place_init_t, Args&&... args )
:
@ -384,7 +434,7 @@ class optional_base : public optional_tag
{
construct(in_place_init, boost::forward<Args>(args)...);
}
template<class... Args>
explicit optional_base ( in_place_init_if_t, bool cond, Args&&... args )
:
@ -400,26 +450,26 @@ class optional_base : public optional_tag
::new (m_storage.address()) value_type( boost::forward<Arg>(arg) );
m_initialized = true ;
}
void construct ( in_place_init_t )
{
::new (m_storage.address()) value_type();
m_initialized = true ;
}
template<class Arg>
void emplace_assign ( Arg&& arg )
{
destroy();
construct(in_place_init, boost::forward<Arg>(arg)) ;
}
void emplace_assign ()
{
destroy();
construct(in_place_init) ;
}
template<class Arg>
explicit optional_base ( in_place_init_t, Arg&& arg )
:
@ -427,14 +477,14 @@ class optional_base : public optional_tag
{
construct(in_place_init, boost::forward<Arg>(arg));
}
explicit optional_base ( in_place_init_t )
:
m_initialized(false)
{
construct(in_place_init);
}
template<class Arg>
explicit optional_base ( in_place_init_if_t, bool cond, Arg&& arg )
:
@ -443,7 +493,7 @@ class optional_base : public optional_tag
if ( cond )
construct(in_place_init, boost::forward<Arg>(arg));
}
explicit optional_base ( in_place_init_if_t, bool cond )
:
m_initialized(false)
@ -453,21 +503,21 @@ class optional_base : public optional_tag
}
#else
template<class Arg>
void construct ( in_place_init_t, const Arg& arg )
{
::new (m_storage.address()) value_type( arg );
m_initialized = true ;
}
template<class Arg>
void construct ( in_place_init_t, Arg& arg )
{
::new (m_storage.address()) value_type( arg );
m_initialized = true ;
}
void construct ( in_place_init_t )
{
::new (m_storage.address()) value_type();
@ -480,20 +530,20 @@ class optional_base : public optional_tag
destroy();
construct(in_place_init, arg);
}
template<class Arg>
void emplace_assign ( Arg& arg )
{
destroy();
construct(in_place_init, arg);
}
void emplace_assign ()
{
destroy();
construct(in_place_init);
}
template<class Arg>
explicit optional_base ( in_place_init_t, const Arg& arg )
: m_initialized(false)
@ -507,13 +557,13 @@ class optional_base : public optional_tag
{
construct(in_place_init, arg);
}
explicit optional_base ( in_place_init_t )
: m_initialized(false)
{
construct(in_place_init);
}
template<class Arg>
explicit optional_base ( in_place_init_if_t, bool cond, const Arg& arg )
: m_initialized(false)
@ -521,15 +571,15 @@ class optional_base : public optional_tag
if ( cond )
construct(in_place_init, arg);
}
template<class Arg>
explicit optional_base ( in_place_init_if_t, bool cond, Arg& arg )
: m_initialized(false)
{
if ( cond )
construct(in_place_init, arg);
}
}
explicit optional_base ( in_place_init_if_t, bool cond )
: m_initialized(false)
{
@ -713,7 +763,7 @@ class optional_base : public optional_tag
private :
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1900))
void destroy_impl ( ) { m_storage.ptr_ref()->~T() ; m_initialized = false ; }
#else
void destroy_impl ( ) { m_storage.ref().T::~T() ; m_initialized = false ; }
@ -723,6 +773,8 @@ class optional_base : public optional_tag
storage_type m_storage ;
} ;
#include <boost/optional/detail/optional_trivially_copyable_base.hpp>
// definition of metafunciton is_optional_val_init_candidate
template <typename U>
struct is_optional_related
@ -734,7 +786,7 @@ struct is_optional_related
{};
#if !defined(BOOST_OPTIONAL_DETAIL_NO_IS_CONSTRUCTIBLE_TRAIT)
template <typename T, typename U>
struct is_convertible_to_T_or_factory
: boost::conditional< boost::is_base_of<boost::in_place_factory_base, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
@ -764,13 +816,34 @@ struct is_optional_val_init_candidate
: boost::conditional< !is_optional_related<U>::value && is_convertible_to_T_or_factory<T, U>::value
, boost::true_type, boost::false_type>::type
{};
} // namespace optional_detail
namespace optional_config {
template <typename T>
struct optional_uses_direct_storage_for
: boost::conditional<(boost::is_scalar<T>::value && !boost::is_const<T>::value && !boost::is_volatile<T>::value)
, boost::true_type, boost::false_type>::type
{};
} // namespace optional_config
#ifndef BOOST_OPTIONAL_DETAIL_NO_DIRECT_STORAGE_SPEC
# define BOOST_OPTIONAL_BASE_TYPE(T) boost::conditional< optional_config::optional_uses_direct_storage_for<T>::value, \
optional_detail::tc_optional_base<T>, \
optional_detail::optional_base<T> \
>::type
#else
# define BOOST_OPTIONAL_BASE_TYPE(T) optional_detail::optional_base<T>
#endif
template<class T>
class optional : public optional_detail::optional_base<T>
class optional
: public BOOST_OPTIONAL_BASE_TYPE(T)
{
typedef optional_detail::optional_base<T> base ;
typedef typename BOOST_OPTIONAL_BASE_TYPE(T) base ;
public :
@ -802,7 +875,7 @@ class optional : public optional_detail::optional_base<T>
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Creates an optional<T> initialized with 'move(val)'.
// Can throw if T::T(T &&) does
optional ( rval_reference_type val ) : base( boost::forward<T>(val) )
optional ( rval_reference_type val ) : base( boost::forward<T>(val) )
{}
#endif
@ -810,6 +883,13 @@ class optional : public optional_detail::optional_base<T>
// Can throw if T::T(T const&) does
optional ( bool cond, argument_type val ) : base(cond,val) {}
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
/// Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional.
// Can throw if T::T(T &&) does
optional ( bool cond, rval_reference_type val ) : base( cond, boost::forward<T>(val) )
{}
#endif
// NOTE: MSVC needs templated versions first
// Creates a deep copy of another convertible optional<U>
@ -818,7 +898,7 @@ class optional : public optional_detail::optional_base<T>
template<class U>
explicit optional ( optional<U> const& rhs
#ifndef BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
,typename boost::enable_if< optional_detail::is_optional_constructible<T, U const&> >::type* = 0
,BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_constructible<T, U const&>, bool>::type = true
#endif
)
:
@ -827,7 +907,7 @@ class optional : public optional_detail::optional_base<T>
if ( rhs.is_initialized() )
this->construct(rhs.get());
}
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Creates a deep move of another convertible optional<U>
// Requires a valid conversion from U to T.
@ -835,7 +915,7 @@ class optional : public optional_detail::optional_base<T>
template<class U>
explicit optional ( optional<U> && rhs
#ifndef BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
,typename boost::enable_if< optional_detail::is_optional_constructible<T, U> >::type* = 0
,BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_constructible<T, U>, bool>::type = true
#endif
)
:
@ -860,10 +940,10 @@ class optional : public optional_detail::optional_base<T>
template<class Expr>
explicit optional ( Expr&& expr,
BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_val_init_candidate<T, Expr> >::type* = 0
)
: base(boost::forward<Expr>(expr),boost::addressof(expr))
explicit optional ( Expr&& expr,
BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_val_init_candidate<T, Expr>, bool>::type = true
)
: base(boost::forward<Expr>(expr),boost::addressof(expr))
{}
#else
@ -874,15 +954,24 @@ class optional : public optional_detail::optional_base<T>
// Creates a deep copy of another optional<T>
// Can throw if T::T(T const&) does
#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
optional ( optional const& ) = default;
#else
optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {}
#endif
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Creates a deep move of another optional<T>
// Can throw if T::T(T&&) does
optional ( optional && rhs )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
: base( boost::move(rhs) )
{}
// Creates a deep move of another optional<T>
// Can throw if T::T(T&&) does
#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
optional ( optional && rhs ) = default;
#else
optional ( optional && rhs )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
: base( boost::move(rhs) )
{}
#endif
#endif
@ -891,14 +980,14 @@ class optional : public optional_detail::optional_base<T>
~optional() {}
#endif
#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
// Assigns from an expression. See corresponding constructor.
// Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
template<class Expr>
BOOST_DEDUCED_TYPENAME boost::enable_if<optional_detail::is_optional_val_init_candidate<T, Expr>, optional&>::type
BOOST_DEDUCED_TYPENAME boost::enable_if<optional_detail::is_optional_val_init_candidate<T, Expr>, optional&>::type
operator= ( Expr&& expr )
{
this->assign_expr(boost::forward<Expr>(expr),boost::addressof(expr));
@ -924,7 +1013,7 @@ class optional : public optional_detail::optional_base<T>
this->assign(rhs);
return *this ;
}
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Move-assigns from another convertible optional<U> (converts && deep-moves the rhs value)
// Requires a valid conversion from U to T.
@ -940,22 +1029,31 @@ class optional : public optional_detail::optional_base<T>
// Assigns from another optional<T> (deep-copies the rhs value)
// Basic Guarantee: If T::T( T const& ) throws, this is left UNINITIALIZED
// (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw)
#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
optional& operator= ( optional const& rhs ) = default;
#else
optional& operator= ( optional const& rhs )
{
this->assign( static_cast<base const&>(rhs) ) ;
return *this ;
}
#endif
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Assigns from another optional<T> (deep-moves the rhs value)
optional& operator= ( optional && rhs )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
optional& operator= ( optional && ) = default;
#else
optional& operator= ( optional && rhs )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
{
this->assign( static_cast<base &&>(rhs) ) ;
return *this ;
}
#endif
#endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
// Assigns from a T (deep-moves/copies the rhs value)
@ -966,7 +1064,7 @@ class optional : public optional_detail::optional_base<T>
this->assign( boost::forward<T_>(val) ) ;
return *this ;
}
#else
// Assigns from a T (deep-copies the rhs value)
@ -976,7 +1074,7 @@ class optional : public optional_detail::optional_base<T>
this->assign( val ) ;
return *this ;
}
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Assigns from a T (deep-moves the rhs value)
optional& operator= ( rval_reference_type val )
@ -985,9 +1083,9 @@ class optional : public optional_detail::optional_base<T>
return *this ;
}
#endif
#endif // BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
// Assigns from a "none"
// Which destroys the current value, if any, leaving this UNINITIALIZED
// No-throw (assuming T::~T() doesn't)
@ -996,7 +1094,7 @@ class optional : public optional_detail::optional_base<T>
this->assign( none_ ) ;
return *this ;
}
#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
// Constructs in-place
// upon exception *this is always uninitialized
@ -1005,29 +1103,29 @@ class optional : public optional_detail::optional_base<T>
{
this->emplace_assign( boost::forward<Args>(args)... );
}
template<class... Args>
explicit optional ( in_place_init_t, Args&&... args )
: base( in_place_init, boost::forward<Args>(args)... )
{}
template<class... Args>
explicit optional ( in_place_init_if_t, bool cond, Args&&... args )
: base( in_place_init_if, cond, boost::forward<Args>(args)... )
{}
#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
template<class Arg>
void emplace ( Arg&& arg )
{
this->emplace_assign( boost::forward<Arg>(arg) );
}
void emplace ()
{
this->emplace_assign();
}
template<class Args>
explicit optional ( in_place_init_t, Args&& args )
: base( in_place_init, boost::forward<Args>(args) )
@ -1036,12 +1134,12 @@ class optional : public optional_detail::optional_base<T>
explicit optional ( in_place_init_t )
: base( in_place_init )
{}
template<class Args>
explicit optional ( in_place_init_if_t, bool cond, Args&& args )
: base( in_place_init_if, cond, boost::forward<Args>(args) )
{}
explicit optional ( in_place_init_if_t, bool cond )
: base( in_place_init_if, cond )
{}
@ -1051,23 +1149,23 @@ class optional : public optional_detail::optional_base<T>
{
this->emplace_assign( arg );
}
template<class Arg>
void emplace ( Arg& arg )
{
this->emplace_assign( arg );
}
void emplace ()
{
this->emplace_assign();
}
template<class Arg>
explicit optional ( in_place_init_t, const Arg& arg )
: base( in_place_init, arg )
{}
template<class Arg>
explicit optional ( in_place_init_t, Arg& arg )
: base( in_place_init, arg )
@ -1076,24 +1174,24 @@ class optional : public optional_detail::optional_base<T>
explicit optional ( in_place_init_t )
: base( in_place_init )
{}
template<class Arg>
explicit optional ( in_place_init_if_t, bool cond, const Arg& arg )
: base( in_place_init_if, cond, arg )
{}
template<class Arg>
explicit optional ( in_place_init_if_t, bool cond, Arg& arg )
: base( in_place_init_if, cond, arg )
{}
{}
explicit optional ( in_place_init_if_t, bool cond )
: base( in_place_init_if, cond )
{}
#endif
void swap( optional & arg )
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
{
// allow for Koenig lookup
boost::swap(*this, arg);
@ -1119,7 +1217,7 @@ class optional : public optional_detail::optional_base<T>
// Returns a reference to the value if this is initialized, otherwise,
// the behaviour is UNDEFINED
// No-throw
#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
reference_const_type operator *() const& { return this->get() ; }
reference_type operator *() & { return this->get() ; }
reference_type_of_temporary_wrapper operator *() && { return boost::move(this->get()) ; }
@ -1128,42 +1226,42 @@ class optional : public optional_detail::optional_base<T>
reference_type operator *() { return this->get() ; }
#endif // !defined BOOST_NO_CXX11_REF_QUALIFIERS
#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
reference_const_type value() const&
{
{
if (this->is_initialized())
return this->get() ;
else
throw_exception(bad_optional_access());
}
reference_type value() &
{
{
if (this->is_initialized())
return this->get() ;
else
throw_exception(bad_optional_access());
}
reference_type_of_temporary_wrapper value() &&
{
{
if (this->is_initialized())
return boost::move(this->get()) ;
else
throw_exception(bad_optional_access());
}
#else
#else
reference_const_type value() const
{
{
if (this->is_initialized())
return this->get() ;
else
throw_exception(bad_optional_access());
}
reference_type value()
{
{
if (this->is_initialized())
return this->get() ;
else
@ -1175,16 +1273,16 @@ class optional : public optional_detail::optional_base<T>
#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
template <class U>
value_type value_or ( U&& v ) const&
{
{
if (this->is_initialized())
return get();
else
return boost::forward<U>(v);
}
template <class U>
value_type value_or ( U&& v ) &&
{
value_type value_or ( U&& v ) &&
{
if (this->is_initialized())
return boost::move(get());
else
@ -1192,7 +1290,7 @@ class optional : public optional_detail::optional_base<T>
}
#elif !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
template <class U>
value_type value_or ( U&& v ) const
value_type value_or ( U&& v ) const
{
if (this->is_initialized())
return get();
@ -1201,17 +1299,17 @@ class optional : public optional_detail::optional_base<T>
}
#else
template <class U>
value_type value_or ( U const& v ) const
{
value_type value_or ( U const& v ) const
{
if (this->is_initialized())
return get();
else
return v;
}
template <class U>
value_type value_or ( U& v ) const
{
value_type value_or ( U& v ) const
{
if (this->is_initialized())
return get();
else
@ -1220,7 +1318,7 @@ class optional : public optional_detail::optional_base<T>
#endif
#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
template <typename F>
value_type value_or_eval ( F f ) const&
{
@ -1229,7 +1327,7 @@ class optional : public optional_detail::optional_base<T>
else
return f();
}
template <typename F>
value_type value_or_eval ( F f ) &&
{
@ -1238,6 +1336,61 @@ class optional : public optional_detail::optional_base<T>
else
return f();
}
template <typename F>
optional<typename boost::result_of<F(reference_type)>::type> map(F f) &
{
if (this->has_value())
return f(get());
else
return none;
}
template <typename F>
optional<typename boost::result_of<F(reference_const_type)>::type> map(F f) const&
{
if (this->has_value())
return f(get());
else
return none;
}
template <typename F>
optional<typename boost::result_of<F(reference_type_of_temporary_wrapper)>::type> map(F f) &&
{
if (this->has_value())
return f(boost::move(this->get()));
else
return none;
}
template <typename F>
optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_type)>::type>::type> flat_map(F f) &
{
if (this->has_value())
return f(get());
else
return none;
}
template <typename F>
optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_const_type)>::type>::type> flat_map(F f) const&
{
if (this->has_value())
return f(get());
else
return none;
}
template <typename F>
optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_type_of_temporary_wrapper)>::type>::type> flat_map(F f) &&
{
if (this->has_value())
return f(boost::move(get()));
else
return none;
}
#else
template <typename F>
value_type value_or_eval ( F f ) const
@ -1247,10 +1400,49 @@ class optional : public optional_detail::optional_base<T>
else
return f();
}
template <typename F>
optional<typename boost::result_of<F(reference_type)>::type> map(F f)
{
if (this->has_value())
return f(get());
else
return none;
}
template <typename F>
optional<typename boost::result_of<F(reference_const_type)>::type> map(F f) const
{
if (this->has_value())
return f(get());
else
return none;
}
template <typename F>
optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_type)>::type>::type> flat_map(F f)
{
if (this->has_value())
return f(get());
else
return none;
}
template <typename F>
optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_const_type)>::type>::type> flat_map(F f) const
{
if (this->has_value())
return f(get());
else
return none;
}
#endif
bool has_value() const BOOST_NOEXCEPT { return this->is_initialized() ; }
bool operator!() const BOOST_NOEXCEPT { return !this->is_initialized() ; }
BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
} ;
@ -1259,7 +1451,7 @@ class optional : public optional_detail::optional_base<T>
#endif // BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
namespace boost {
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
template<class T>
class optional<T&&>
@ -1276,6 +1468,25 @@ class optional<T&&>
namespace boost {
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
template<class T>
inline
optional<BOOST_DEDUCED_TYPENAME boost::decay<T>::type> make_optional ( T && v )
{
return optional<BOOST_DEDUCED_TYPENAME boost::decay<T>::type>(boost::forward<T>(v));
}
// Returns optional<T>(cond,v)
template<class T>
inline
optional<BOOST_DEDUCED_TYPENAME boost::decay<T>::type> make_optional ( bool cond, T && v )
{
return optional<BOOST_DEDUCED_TYPENAME boost::decay<T>::type>(cond,boost::forward<T>(v));
}
#else
// Returns optional<T>(v)
template<class T>
inline
@ -1292,6 +1503,8 @@ optional<T> make_optional ( bool cond, T const& v )
return optional<T>(cond,v);
}
#endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED.
// No-throw
template<class T>
@ -1367,14 +1580,14 @@ get_pointer ( optional<T>& opt )
} // namespace boost
namespace boost {
// The following declaration prevents a bug where operator safe-bool is used upon streaming optional object if you forget the IO header.
template<class CharType, class CharTrait>
std::basic_ostream<CharType, CharTrait>&
operator<<(std::basic_ostream<CharType, CharTrait>& os, optional_detail::optional_tag const&)
{
BOOST_STATIC_ASSERT_MSG(sizeof(CharType) == 0, "If you want to output boost::optional, include header <boost/optional/optional_io.hpp>");
return os;
return os;
}
} // namespace boost

0
3rdparty/boost/boost/parameter.hpp vendored Executable file → Normal file
View File

0
3rdparty/boost/boost/parameter/aux_/overloads.hpp vendored Executable file → Normal file
View File

0
3rdparty/boost/boost/parameter/aux_/parameter_requirements.hpp vendored Executable file → Normal file
View File

0
3rdparty/boost/boost/parameter/aux_/preprocessor/flatten.hpp vendored Executable file → Normal file
View File

0
3rdparty/boost/boost/parameter/aux_/preprocessor/for_each.hpp vendored Executable file → Normal file
View File

0
3rdparty/boost/boost/parameter/aux_/result_of0.hpp vendored Executable file → Normal file
View File

0
3rdparty/boost/boost/parameter/aux_/tag.hpp vendored Executable file → Normal file
View File

0
3rdparty/boost/boost/parameter/aux_/template_keyword.hpp vendored Executable file → Normal file
View File

0
3rdparty/boost/boost/parameter/aux_/void.hpp vendored Executable file → Normal file
View File

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