mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
miniboost: update to 1.58
This commit is contained in:
parent
b5dc06da7e
commit
87bf341f61
95 changed files with 4679 additions and 2261 deletions
|
@ -6,7 +6,16 @@
|
|||
#define EDEADLK 35 /* Resource deadlock would occur */
|
||||
#define ENAMETOOLONG 36 /* File name too long */
|
||||
#define ENOLCK 37 /* No record locks available */
|
||||
#define ENOSYS 38 /* Function not implemented */
|
||||
|
||||
/*
|
||||
* This error code is special: arch syscall entry code will return
|
||||
* -ENOSYS if users try to call a syscall that doesn't exist. To keep
|
||||
* failures of syscalls that really do exist distinguishable from
|
||||
* failures due to attempts to use a nonexistent syscall, syscall
|
||||
* implementations should refrain from returning -ENOSYS.
|
||||
*/
|
||||
#define ENOSYS 38 /* Invalid system call number */
|
||||
|
||||
#define ENOTEMPTY 39 /* Directory not empty */
|
||||
#define ELOOP 40 /* Too many symbolic links encountered */
|
||||
#define EWOULDBLOCK EAGAIN /* Operation would block */
|
||||
|
|
|
@ -113,7 +113,6 @@ __END_DECLS
|
|||
|
||||
|
||||
#if defined __USE_ISOC11 && !defined __cplusplus
|
||||
/* Static assertion. Requires support in the compiler. */
|
||||
# undef static_assert
|
||||
# define static_assert _Static_assert
|
||||
#endif
|
||||
|
|
|
@ -108,6 +108,11 @@ typedef struct
|
|||
{
|
||||
void *si_addr; /* Faulting insn/memory ref. */
|
||||
short int si_addr_lsb; /* Valid LSB of the reported address. */
|
||||
struct
|
||||
{
|
||||
void *_lower;
|
||||
void *_upper;
|
||||
} si_addr_bnd;
|
||||
} _sigfault;
|
||||
|
||||
/* SIGPOLL. */
|
||||
|
@ -141,6 +146,8 @@ typedef struct
|
|||
# define si_ptr _sifields._rt.si_sigval.sival_ptr
|
||||
# define si_addr _sifields._sigfault.si_addr
|
||||
# define si_addr_lsb _sifields._sigfault.si_addr_lsb
|
||||
# define si_lower _sifields._sigfault.si_addr_bnd._lower
|
||||
# define si_upper _sifields._sigfault.si_addr_bnd._upper
|
||||
# define si_band _sifields._sigpoll.si_band
|
||||
# define si_fd _sifields._sigpoll.si_fd
|
||||
# define si_call_addr _sifields._sigsys._call_addr
|
||||
|
|
|
@ -176,13 +176,15 @@ __memmove_g (void *__dest, const void *__src, size_t __n)
|
|||
"m" ( *(struct { __extension__ char __x[__n]; } *)__src));
|
||||
else
|
||||
__asm__ __volatile__
|
||||
("std\n\t"
|
||||
("decl %1\n\t"
|
||||
"decl %2\n\t"
|
||||
"std\n\t"
|
||||
"rep; movsb\n\t"
|
||||
"cld"
|
||||
: "=&c" (__d0), "=&S" (__d1), "=&D" (__d2),
|
||||
"=m" ( *(struct { __extension__ char __x[__n]; } *)__dest)
|
||||
: "0" (__n), "1" (__n - 1 + (const char *) __src),
|
||||
"2" (__n - 1 + (char *) __tmp),
|
||||
: "0" (__n), "1" (__n + (const char *) __src),
|
||||
"2" (__n + (char *) __tmp),
|
||||
"m" ( *(struct { __extension__ char __x[__n]; } *)__src));
|
||||
return __dest;
|
||||
}
|
||||
|
@ -999,9 +1001,10 @@ __strcat_c (char *__dest, const char __src[], size_t __srclen)
|
|||
: "cc");
|
||||
--__tmp;
|
||||
# else
|
||||
register char *__tmp = __dest - 1;
|
||||
register char *__tmp = __dest;
|
||||
__asm__ __volatile__
|
||||
("1:\n\t"
|
||||
("decl %0\n\t"
|
||||
"1:\n\t"
|
||||
"incl %0\n\t"
|
||||
"cmpb $0,(%0)\n\t"
|
||||
"jne 1b\n"
|
||||
|
@ -1020,10 +1023,11 @@ __STRING_INLINE char *__strcat_g (char *__dest, const char *__src);
|
|||
__STRING_INLINE char *
|
||||
__strcat_g (char *__dest, const char *__src)
|
||||
{
|
||||
register char *__tmp = __dest - 1;
|
||||
register char *__tmp = __dest;
|
||||
register char __dummy;
|
||||
__asm__ __volatile__
|
||||
("1:\n\t"
|
||||
("decl %1\n\t"
|
||||
"1:\n\t"
|
||||
"incl %1\n\t"
|
||||
"cmpb $0,(%1)\n\t"
|
||||
"jne 1b\n"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <bits/types.h>
|
||||
|
||||
/* These definitions from linux/timex.h as of 2.6.30. */
|
||||
/* These definitions from linux/timex.h as of 3.18. */
|
||||
|
||||
struct timex
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ struct timex
|
|||
__syscall_slong_t constant; /* pll time constant */
|
||||
__syscall_slong_t precision; /* clock precision (usec) (ro) */
|
||||
__syscall_slong_t tolerance; /* clock frequency tolerance (ppm) (ro) */
|
||||
struct timeval time; /* (read only) */
|
||||
struct timeval time; /* (read only, except for ADJ_SETOFFSET) */
|
||||
__syscall_slong_t tick; /* (modified) usecs between clock ticks */
|
||||
__syscall_slong_t ppsfreq; /* pps frequency (scaled ppm) (ro) */
|
||||
__syscall_slong_t jitter; /* pps jitter (us) (ro) */
|
||||
|
@ -60,6 +60,7 @@ struct timex
|
|||
#define ADJ_STATUS 0x0010 /* clock status */
|
||||
#define ADJ_TIMECONST 0x0020 /* pll time constant */
|
||||
#define ADJ_TAI 0x0080 /* set TAI offset */
|
||||
#define ADJ_SETOFFSET 0x0100 /* add 'time' to current time */
|
||||
#define ADJ_MICRO 0x1000 /* select microsecond resolution */
|
||||
#define ADJ_NANO 0x2000 /* select nanosecond resolution */
|
||||
#define ADJ_TICK 0x4000 /* tick value */
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#include <boost/bind/arg.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/visit_each.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/core/is_same.hpp>
|
||||
|
||||
// Borland-specific bug, visit_each() silently fails to produce code
|
||||
|
||||
|
@ -859,7 +861,295 @@ public:
|
|||
|
||||
// bind_t
|
||||
|
||||
#ifndef BOOST_NO_VOID_RETURNS
|
||||
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
||||
|
||||
template< class A > struct list_add_cref
|
||||
{
|
||||
typedef A const & type;
|
||||
};
|
||||
|
||||
template< class A > struct list_add_cref< A& >
|
||||
{
|
||||
typedef A & type;
|
||||
};
|
||||
|
||||
template<class R, class F, class L> class bind_t
|
||||
{
|
||||
private:
|
||||
|
||||
F f_;
|
||||
L l_;
|
||||
|
||||
public:
|
||||
|
||||
typedef typename result_traits<R, F>::type result_type;
|
||||
typedef bind_t this_type;
|
||||
|
||||
bind_t( F f, L const & l ): f_( f ), l_( l ) {}
|
||||
|
||||
//
|
||||
|
||||
result_type operator()()
|
||||
{
|
||||
list0 a;
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
result_type operator()() const
|
||||
{
|
||||
list0 a;
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1> result_type operator()( A1 && a1 )
|
||||
{
|
||||
list1< typename list_add_cref<A1>::type > a( a1 );
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1> result_type operator()( A1 && a1 ) const
|
||||
{
|
||||
list1< typename list_add_cref<A1>::type > a( a1 );
|
||||
return l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2> result_type operator()( A1 && a1, A2 && a2 )
|
||||
{
|
||||
list2< typename list_add_cref<A1>::type, typename list_add_cref<A2>::type > a( a1, a2 );
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2> result_type operator()( A1 && a1, A2 && a2 ) const
|
||||
{
|
||||
list2< typename list_add_cref<A1>::type, typename list_add_cref<A2>::type > a( a1, a2 );
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3> result_type operator()( A1 && a1, A2 && a2, A3 && a3 )
|
||||
{
|
||||
list3<
|
||||
typename list_add_cref<A1>::type,
|
||||
typename list_add_cref<A2>::type,
|
||||
typename list_add_cref<A3>::type
|
||||
> a( a1, a2, a3 );
|
||||
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3> result_type operator()( A1 && a1, A2 && a2, A3 && a3 ) const
|
||||
{
|
||||
list3<
|
||||
typename list_add_cref<A1>::type,
|
||||
typename list_add_cref<A2>::type,
|
||||
typename list_add_cref<A3>::type
|
||||
> a( a1, a2, a3 );
|
||||
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4 )
|
||||
{
|
||||
list4<
|
||||
typename list_add_cref<A1>::type,
|
||||
typename list_add_cref<A2>::type,
|
||||
typename list_add_cref<A3>::type,
|
||||
typename list_add_cref<A4>::type
|
||||
> a( a1, a2, a3, a4 );
|
||||
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) const
|
||||
{
|
||||
list4<
|
||||
typename list_add_cref<A1>::type,
|
||||
typename list_add_cref<A2>::type,
|
||||
typename list_add_cref<A3>::type,
|
||||
typename list_add_cref<A4>::type
|
||||
> a( a1, a2, a3, a4 );
|
||||
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 )
|
||||
{
|
||||
list5<
|
||||
typename list_add_cref<A1>::type,
|
||||
typename list_add_cref<A2>::type,
|
||||
typename list_add_cref<A3>::type,
|
||||
typename list_add_cref<A4>::type,
|
||||
typename list_add_cref<A5>::type
|
||||
> a( a1, a2, a3, a4, a5 );
|
||||
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) const
|
||||
{
|
||||
list5<
|
||||
typename list_add_cref<A1>::type,
|
||||
typename list_add_cref<A2>::type,
|
||||
typename list_add_cref<A3>::type,
|
||||
typename list_add_cref<A4>::type,
|
||||
typename list_add_cref<A5>::type
|
||||
> a( a1, a2, a3, a4, a5 );
|
||||
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 )
|
||||
{
|
||||
list6<
|
||||
typename list_add_cref<A1>::type,
|
||||
typename list_add_cref<A2>::type,
|
||||
typename list_add_cref<A3>::type,
|
||||
typename list_add_cref<A4>::type,
|
||||
typename list_add_cref<A5>::type,
|
||||
typename list_add_cref<A6>::type
|
||||
> a( a1, a2, a3, a4, a5, a6 );
|
||||
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) const
|
||||
{
|
||||
list6<
|
||||
typename list_add_cref<A1>::type,
|
||||
typename list_add_cref<A2>::type,
|
||||
typename list_add_cref<A3>::type,
|
||||
typename list_add_cref<A4>::type,
|
||||
typename list_add_cref<A5>::type,
|
||||
typename list_add_cref<A6>::type
|
||||
> a( a1, a2, a3, a4, a5, a6 );
|
||||
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 )
|
||||
{
|
||||
list7<
|
||||
typename list_add_cref<A1>::type,
|
||||
typename list_add_cref<A2>::type,
|
||||
typename list_add_cref<A3>::type,
|
||||
typename list_add_cref<A4>::type,
|
||||
typename list_add_cref<A5>::type,
|
||||
typename list_add_cref<A6>::type,
|
||||
typename list_add_cref<A7>::type
|
||||
> a( a1, a2, a3, a4, a5, a6, a7 );
|
||||
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) const
|
||||
{
|
||||
list7<
|
||||
typename list_add_cref<A1>::type,
|
||||
typename list_add_cref<A2>::type,
|
||||
typename list_add_cref<A3>::type,
|
||||
typename list_add_cref<A4>::type,
|
||||
typename list_add_cref<A5>::type,
|
||||
typename list_add_cref<A6>::type,
|
||||
typename list_add_cref<A7>::type
|
||||
> a( a1, a2, a3, a4, a5, a6, a7 );
|
||||
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 )
|
||||
{
|
||||
list8<
|
||||
typename list_add_cref<A1>::type,
|
||||
typename list_add_cref<A2>::type,
|
||||
typename list_add_cref<A3>::type,
|
||||
typename list_add_cref<A4>::type,
|
||||
typename list_add_cref<A5>::type,
|
||||
typename list_add_cref<A6>::type,
|
||||
typename list_add_cref<A7>::type,
|
||||
typename list_add_cref<A8>::type
|
||||
> a( a1, a2, a3, a4, a5, a6, a7, a8 );
|
||||
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) const
|
||||
{
|
||||
list8<
|
||||
typename list_add_cref<A1>::type,
|
||||
typename list_add_cref<A2>::type,
|
||||
typename list_add_cref<A3>::type,
|
||||
typename list_add_cref<A4>::type,
|
||||
typename list_add_cref<A5>::type,
|
||||
typename list_add_cref<A6>::type,
|
||||
typename list_add_cref<A7>::type,
|
||||
typename list_add_cref<A8>::type
|
||||
> a( a1, a2, a3, a4, a5, a6, a7, a8 );
|
||||
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 )
|
||||
{
|
||||
list9<
|
||||
typename list_add_cref<A1>::type,
|
||||
typename list_add_cref<A2>::type,
|
||||
typename list_add_cref<A3>::type,
|
||||
typename list_add_cref<A4>::type,
|
||||
typename list_add_cref<A5>::type,
|
||||
typename list_add_cref<A6>::type,
|
||||
typename list_add_cref<A7>::type,
|
||||
typename list_add_cref<A8>::type,
|
||||
typename list_add_cref<A9>::type
|
||||
> a( a1, a2, a3, a4, a5, a6, a7, a8, a9 );
|
||||
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) const
|
||||
{
|
||||
list9<
|
||||
typename list_add_cref<A1>::type,
|
||||
typename list_add_cref<A2>::type,
|
||||
typename list_add_cref<A3>::type,
|
||||
typename list_add_cref<A4>::type,
|
||||
typename list_add_cref<A5>::type,
|
||||
typename list_add_cref<A6>::type,
|
||||
typename list_add_cref<A7>::type,
|
||||
typename list_add_cref<A8>::type,
|
||||
typename list_add_cref<A9>::type
|
||||
> a( a1, a2, a3, a4, a5, a6, a7, a8, a9 );
|
||||
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
template<class A> result_type eval( A & a )
|
||||
{
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class A> result_type eval( A & a ) const
|
||||
{
|
||||
return l_( type<result_type>(), f_, a, 0 );
|
||||
}
|
||||
|
||||
template<class V> void accept( V & v ) const
|
||||
{
|
||||
#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ )
|
||||
using boost::visit_each;
|
||||
#endif
|
||||
|
||||
BOOST_BIND_VISIT_EACH( v, f_, 0 );
|
||||
l_.accept( v );
|
||||
}
|
||||
|
||||
bool compare( this_type const & rhs ) const
|
||||
{
|
||||
return ref_compare( f_, rhs.f_, 0 ) && l_ == rhs.l_;
|
||||
}
|
||||
};
|
||||
|
||||
#elif !defined( BOOST_NO_VOID_RETURNS )
|
||||
|
||||
template<class R, class F, class L> class bind_t
|
||||
{
|
||||
|
@ -875,7 +1165,7 @@ public:
|
|||
|
||||
};
|
||||
|
||||
#else
|
||||
#else // no void returns
|
||||
|
||||
template<class R> struct bind_t_generator
|
||||
{
|
||||
|
|
|
@ -34,6 +34,28 @@ template<class R, class T,
|
|||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1));
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F;
|
||||
typedef typename _bi::list_av_1<A1>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1));
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F;
|
||||
typedef typename _bi::list_av_1<A1>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1));
|
||||
}
|
||||
|
||||
// 1
|
||||
|
||||
template<class R, class T,
|
||||
|
@ -58,6 +80,30 @@ template<class R, class T,
|
|||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1,
|
||||
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)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
|
||||
typedef typename _bi::list_av_2<A1, A2>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1,
|
||||
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)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
|
||||
typedef typename _bi::list_av_2<A1, A2>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2));
|
||||
}
|
||||
|
||||
// 2
|
||||
|
||||
template<class R, class T,
|
||||
|
@ -82,6 +128,30 @@ template<class R, class T,
|
|||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2,
|
||||
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)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
|
||||
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2,
|
||||
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)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
|
||||
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3));
|
||||
}
|
||||
|
||||
// 3
|
||||
|
||||
template<class R, class T,
|
||||
|
@ -106,6 +176,30 @@ template<class R, class T,
|
|||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3,
|
||||
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)
|
||||
{
|
||||
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;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3,
|
||||
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)
|
||||
{
|
||||
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;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4));
|
||||
}
|
||||
|
||||
// 4
|
||||
|
||||
template<class R, class T,
|
||||
|
@ -130,6 +224,30 @@ template<class R, class T,
|
|||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3, class B4,
|
||||
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)
|
||||
{
|
||||
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;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3, class B4,
|
||||
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)
|
||||
{
|
||||
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;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
|
||||
}
|
||||
|
||||
// 5
|
||||
|
||||
template<class R, class T,
|
||||
|
@ -154,6 +272,30 @@ template<class R, class T,
|
|||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
|
||||
}
|
||||
|
||||
template<class Rt2, 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>
|
||||
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)
|
||||
{
|
||||
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;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
|
||||
}
|
||||
|
||||
template<class Rt2, 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>
|
||||
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)
|
||||
{
|
||||
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;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
|
||||
}
|
||||
|
||||
// 6
|
||||
|
||||
template<class R, class T,
|
||||
|
@ -178,6 +320,30 @@ template<class R, class T,
|
|||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
|
||||
}
|
||||
|
||||
template<class Rt2, 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>
|
||||
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)
|
||||
{
|
||||
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;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
|
||||
}
|
||||
|
||||
template<class Rt2, 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>
|
||||
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)
|
||||
{
|
||||
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;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
|
||||
}
|
||||
|
||||
// 7
|
||||
|
||||
template<class R, class T,
|
||||
|
@ -202,6 +368,30 @@ template<class R, class T,
|
|||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
|
||||
}
|
||||
|
||||
template<class Rt2, 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>
|
||||
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)
|
||||
{
|
||||
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;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
|
||||
}
|
||||
|
||||
template<class Rt2, 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>
|
||||
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)
|
||||
{
|
||||
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;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
|
||||
}
|
||||
|
||||
// 8
|
||||
|
||||
template<class R, class T,
|
||||
|
@ -225,3 +415,27 @@ template<class R, class T,
|
|||
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(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
|
||||
}
|
||||
|
||||
template<class Rt2, 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>
|
||||
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)
|
||||
{
|
||||
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;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
|
||||
}
|
||||
|
||||
template<class Rt2, 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>
|
||||
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)
|
||||
{
|
||||
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;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
|
||||
}
|
||||
|
|
0
miniboost/boost/concept/detail/concept_undef.hpp
Executable file → Normal file
0
miniboost/boost/concept/detail/concept_undef.hpp
Executable file → Normal file
|
@ -818,9 +818,8 @@ namespace boost
|
|||
BOOST_CONCEPT_USAGE(Sequence)
|
||||
{
|
||||
S
|
||||
c(n),
|
||||
c2(n, t),
|
||||
c3(first, last);
|
||||
c(n, t),
|
||||
c2(first, last);
|
||||
|
||||
c.insert(p, t);
|
||||
c.insert(p, n, t);
|
||||
|
@ -833,7 +832,6 @@ namespace boost
|
|||
|
||||
ignore_unused_variable_warning(c);
|
||||
ignore_unused_variable_warning(c2);
|
||||
ignore_unused_variable_warning(c3);
|
||||
ignore_unused_variable_warning(r);
|
||||
const_constraints(c);
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@
|
|||
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_alignas) || __has_extension(cxx_alignas))
|
||||
#if !__has_feature(cxx_alignas)
|
||||
# define BOOST_NO_CXX11_ALIGNAS
|
||||
#endif
|
||||
|
||||
|
@ -205,23 +205,23 @@
|
|||
# define BOOST_NO_CXX11_FINAL
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_binary_literals) || __has_extension(cxx_binary_literals))
|
||||
#if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__))
|
||||
# define BOOST_NO_CXX14_BINARY_LITERALS
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_decltype_auto) || __has_extension(cxx_decltype_auto))
|
||||
#if !__has_feature(__cxx_decltype_auto__)
|
||||
# define BOOST_NO_CXX14_DECLTYPE_AUTO
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_aggregate_nsdmi) || __has_extension(cxx_aggregate_nsdmi))
|
||||
#if !__has_feature(__cxx_aggregate_nsdmi__)
|
||||
# define BOOST_NO_CXX14_AGGREGATE_NSDMI
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_init_captures) || __has_extension(cxx_init_captures))
|
||||
#if !__has_feature(__cxx_init_captures__)
|
||||
# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_generic_lambdas) || __has_extension(cxx_generic_lambdas))
|
||||
#if !__has_feature(__cxx_generic_lambdas__)
|
||||
# define BOOST_NO_CXX14_GENERIC_LAMBDAS
|
||||
#endif
|
||||
|
||||
|
@ -239,16 +239,15 @@
|
|||
// so instead verify that we have a feature that was introduced at the same time as working C++14
|
||||
// constexpr (generic lambda's in this case):
|
||||
//
|
||||
#if !__has_feature(cxx_generic_lambdas) \
|
||||
|| !(__has_feature(cxx_relaxed_constexpr) || __has_extension(cxx_relaxed_constexpr))
|
||||
#if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__)
|
||||
# define BOOST_NO_CXX14_CONSTEXPR
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_return_type_deduction) || __has_extension(cxx_return_type_deduction))
|
||||
#if !__has_feature(__cxx_return_type_deduction__)
|
||||
# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_variable_templates) || __has_extension(cxx_variable_templates))
|
||||
#if !__has_feature(__cxx_variable_templates__)
|
||||
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
|
||||
#endif
|
||||
|
||||
|
|
|
@ -86,26 +86,22 @@
|
|||
# define BOOST_SYMBOL_VISIBLE __global
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Issues that effect all known versions:
|
||||
//
|
||||
#if (__SUNPRO_CC < 0x5130)
|
||||
// C++03 features in 12.4:
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_ADL_BARRIER
|
||||
#define BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
#endif
|
||||
|
||||
//
|
||||
// C++0x features
|
||||
//
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
|
||||
#if (__SUNPRO_CC < 0x5130) || (__cplusplus < 201100)
|
||||
// C++11 only featuires in 12.4:
|
||||
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#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
|
||||
|
@ -120,19 +116,34 @@
|
|||
#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_STATIC_ASSERT
|
||||
#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_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
|
||||
#endif
|
||||
|
||||
//
|
||||
// Issues that effect all known versions:
|
||||
//
|
||||
// Variadic templates pass our test case, but enabling this
|
||||
// causes the compiler to issue a signal 11 and bail out
|
||||
// in various libraries. The others fail our test cases.
|
||||
//
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
//
|
||||
// C++0x features
|
||||
//
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
|
||||
|
||||
// C++ 14:
|
||||
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
#if (_MSC_VER >= 1400) && !defined(_DEBUG)
|
||||
# define BOOST_HAS_NRVO
|
||||
#endif
|
||||
#if _MSC_VER >= 1500 // 150X == VC++ 9.0
|
||||
#if _MSC_VER >= 1600 // 160X == VC++ 10.0
|
||||
# define BOOST_HAS_PRAGMA_DETECT_MISMATCH
|
||||
#endif
|
||||
//
|
||||
|
@ -172,26 +172,26 @@
|
|||
# define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#endif
|
||||
|
||||
// C++11 features supported by VC++ 14 (aka 2014) CTP1
|
||||
// Because the CTP is unsupported, unrelease, and only alpha quality,
|
||||
// it is only supported if BOOST_MSVC_ENABLE_2014_JUN_CTP is defined.
|
||||
// C++11 features supported by VC++ 14 (aka 2015) Preview
|
||||
//
|
||||
#if (_MSC_FULL_VER < 190021730) || !defined(BOOST_MSVC_ENABLE_2014_JUN_CTP)
|
||||
#if (_MSC_FULL_VER < 190022310)
|
||||
# define BOOST_NO_CXX11_NOEXCEPT
|
||||
# define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
# define BOOST_NO_CXX11_ALIGNAS
|
||||
# define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
# define BOOST_NO_CXX11_CHAR16_T
|
||||
# define BOOST_NO_CXX11_CHAR32_T
|
||||
# define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
# define BOOST_NO_CXX14_DECLTYPE_AUTO
|
||||
# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
|
||||
# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
|
||||
# define BOOST_NO_CXX14_BINARY_LITERALS
|
||||
# define BOOST_NO_CXX14_GENERIC_LAMBDAS
|
||||
#endif
|
||||
|
||||
// C++11 features not supported by any versions
|
||||
#define BOOST_NO_CXX11_CHAR16_T
|
||||
#define BOOST_NO_CXX11_CHAR32_T
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
|
||||
|
@ -199,18 +199,12 @@
|
|||
#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 (__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_variable_templates) || (__cpp_variable_templates < 201304)
|
||||
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
|
||||
#endif
|
||||
|
@ -290,8 +284,8 @@
|
|||
#endif
|
||||
|
||||
//
|
||||
// last known and checked version is 19.00.22129 (VC14 CTP4):
|
||||
#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190022129)
|
||||
// last known and checked version is 19.00.22129 (VC14 Preview):
|
||||
#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190022310)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# else
|
||||
|
|
33
miniboost/boost/config/platform/haiku.hpp
Normal file
33
miniboost/boost/config/platform/haiku.hpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
// (C) Copyright Jessica Hamilton 2014.
|
||||
// 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.
|
||||
|
||||
// Haiku specific config options:
|
||||
|
||||
#define BOOST_PLATFORM "Haiku"
|
||||
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#define BOOST_HASH_NO_EXTENSIONS
|
||||
|
||||
#ifndef BOOST_DISABLE_THREADS
|
||||
# define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
#define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
#define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
|
||||
//
|
||||
// thread API's not auto detected:
|
||||
//
|
||||
#define BOOST_HAS_SCHED_YIELD
|
||||
#define BOOST_HAS_PTHREAD_YIELD
|
||||
#define BOOST_HAS_GETTIMEOFDAY
|
||||
|
||||
// boilerplate code:
|
||||
#include <boost/config/posix_features.hpp>
|
|
@ -23,6 +23,9 @@
|
|||
# undef BOOST_HAS_PTHREADS
|
||||
#endif
|
||||
|
||||
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
#define BOOST_HAS_LOG1P
|
||||
#define BOOST_HAS_EXPM1
|
||||
|
||||
|
||||
|
|
|
@ -41,6 +41,10 @@
|
|||
// win32:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp"
|
||||
|
||||
#elif defined(__HAIKU__)
|
||||
// Haiku
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp"
|
||||
|
||||
#elif defined(__BEOS__)
|
||||
// BeOS
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
#include <exception>
|
||||
#endif
|
||||
#include <typeinfo>
|
||||
#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__)
|
||||
#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__)
|
||||
# define BOOST_NO_STD_TYPEINFO
|
||||
#endif
|
||||
|
||||
|
|
|
@ -36,7 +36,8 @@
|
|||
|| defined(_GLIBCXX__PTHREADS) \
|
||||
|| defined(_GLIBCXX_HAS_GTHREADS) \
|
||||
|| defined(_WIN32) \
|
||||
|| defined(_AIX)
|
||||
|| defined(_AIX) \
|
||||
|| defined(__HAIKU__)
|
||||
//
|
||||
// If the std lib has thread support turned on, then turn it on in Boost
|
||||
// as well. We do this because some gcc-3.4 std lib headers define _REENTANT
|
||||
|
@ -145,6 +146,14 @@
|
|||
//
|
||||
#endif
|
||||
|
||||
#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) && (__cplusplus >= 201103L)
|
||||
//
|
||||
// Oracle Solaris compiler uses it's own verison of libstdc++ but doesn't
|
||||
// set __GNUC__
|
||||
//
|
||||
#define BOOST_LIBSTDCXX_VERSION 40800
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_LIBSTDCXX_VERSION)
|
||||
# define BOOST_LIBSTDCXX_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
||||
#endif
|
||||
|
@ -222,6 +231,14 @@
|
|||
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
||||
# define BOOST_NO_CXX11_STD_ALIGN
|
||||
|
||||
//
|
||||
// Headers not present on Solaris with the Oracle compiler:
|
||||
#if defined(__SUNPRO_CC)
|
||||
#define BOOST_NO_CXX11_HDR_FUTURE
|
||||
#define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
#define BOOST_NO_CXX11_HDR_ATOMIC
|
||||
#endif
|
||||
|
||||
#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1))
|
||||
// Headers not always available:
|
||||
# ifndef BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
|
|
|
@ -13,43 +13,82 @@
|
|||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP
|
||||
#define BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/container/detail/config_begin.hpp>
|
||||
#include <boost/container/detail/workaround.hpp>
|
||||
|
||||
// container
|
||||
#include <boost/container/container_fwd.hpp>
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
#include <boost/intrusive/detail/memory_util.hpp>
|
||||
#include <boost/container/detail/memory_util.hpp>
|
||||
#include <boost/container/detail/mpl.hpp>
|
||||
#include <boost/container/detail/type_traits.hpp> //is_empty
|
||||
#include <boost/container/detail/placement_new.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
#include <boost/container/detail/preprocessor.hpp>
|
||||
#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
|
||||
#include <boost/container/detail/std_fwd.hpp>
|
||||
#endif
|
||||
// intrusive
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
// move
|
||||
#include <boost/move/utility_core.hpp>
|
||||
// move/detail
|
||||
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
#include <boost/move/detail/fwd_macros.hpp>
|
||||
#endif
|
||||
// other boost
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 2
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 2
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME destroy
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 1
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME construct
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 9
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace allocator_traits_detail {
|
||||
|
||||
}
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
namespace allocator_traits_detail {
|
||||
|
||||
BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_max_size, max_size)
|
||||
BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_select_on_container_copy_construction, select_on_container_copy_construction)
|
||||
|
||||
} //namespace allocator_traits_detail {
|
||||
|
||||
namespace container_detail {
|
||||
|
||||
//workaround needed for C++03 compilers with no construct()
|
||||
//supporting rvalue references
|
||||
template<class A>
|
||||
template<class Allocator>
|
||||
struct is_std_allocator
|
||||
{ static const bool value = false; };
|
||||
|
||||
|
@ -57,56 +96,77 @@ template<class T>
|
|||
struct is_std_allocator< std::allocator<T> >
|
||||
{ static const bool value = true; };
|
||||
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(pointer)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(const_pointer)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_reference)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(void_pointer)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(const_void_pointer)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(size_type)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_copy_assignment)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_move_assignment)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_swap)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(is_always_equal)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(is_partially_propagable)
|
||||
|
||||
} //namespace container_detail {
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
//! The class template allocator_traits supplies a uniform interface to all allocator types.
|
||||
//! This class is a C++03-compatible implementation of std::allocator_traits
|
||||
template <typename Alloc>
|
||||
template <typename Allocator>
|
||||
struct allocator_traits
|
||||
{
|
||||
//allocator_type
|
||||
typedef Alloc allocator_type;
|
||||
typedef Allocator allocator_type;
|
||||
//value_type
|
||||
typedef typename Alloc::value_type value_type;
|
||||
typedef typename allocator_type::value_type value_type;
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
//! Alloc::pointer if such a type exists; otherwise, value_type*
|
||||
//! Allocator::pointer if such a type exists; otherwise, value_type*
|
||||
//!
|
||||
typedef unspecified pointer;
|
||||
//! Alloc::const_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<const
|
||||
//! Allocator::const_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<const
|
||||
//!
|
||||
typedef see_documentation const_pointer;
|
||||
//! Non-standard extension
|
||||
//! Alloc::reference if such a type exists; otherwise, value_type&
|
||||
//! Allocator::reference if such a type exists; otherwise, value_type&
|
||||
typedef see_documentation reference;
|
||||
//! Non-standard extension
|
||||
//! Alloc::const_reference if such a type exists ; otherwise, const value_type&
|
||||
//! Allocator::const_reference if such a type exists ; otherwise, const value_type&
|
||||
typedef see_documentation const_reference;
|
||||
//! Alloc::void_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<void>.
|
||||
//! Allocator::void_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<void>.
|
||||
//!
|
||||
typedef see_documentation void_pointer;
|
||||
//! Alloc::const_void_pointer if such a type exists ; otherwis e, pointer_traits<pointer>::rebind<const
|
||||
//! Allocator::const_void_pointer if such a type exists ; otherwis e, pointer_traits<pointer>::rebind<const
|
||||
//!
|
||||
typedef see_documentation const_void_pointer;
|
||||
//! Alloc::difference_type if such a type exists ; otherwise, pointer_traits<pointer>::difference_type.
|
||||
//! Allocator::difference_type if such a type exists ; otherwise, pointer_traits<pointer>::difference_type.
|
||||
//!
|
||||
typedef see_documentation difference_type;
|
||||
//! Alloc::size_type if such a type exists ; otherwise, make_unsigned<difference_type>::type
|
||||
//! Allocator::size_type if such a type exists ; otherwise, make_unsigned<difference_type>::type
|
||||
//!
|
||||
typedef see_documentation size_type;
|
||||
//! Alloc::propagate_on_container_copy_assignment if such a type exists, otherwise an integral_constant
|
||||
//! type with internal constant static member <code>value</code> == false.
|
||||
//! Allocator::propagate_on_container_copy_assignment if such a type exists, otherwise a type
|
||||
//! with an internal constant static boolean member <code>value</code> == false.
|
||||
typedef see_documentation propagate_on_container_copy_assignment;
|
||||
//! Alloc::propagate_on_container_move_assignment if such a type exists, otherwise an integral_constant
|
||||
//! type with internal constant static member <code>value</code> == false.
|
||||
//! Allocator::propagate_on_container_move_assignment if such a type exists, otherwise a type
|
||||
//! with an internal constant static boolean member <code>value</code> == false.
|
||||
typedef see_documentation propagate_on_container_move_assignment;
|
||||
//! Alloc::propagate_on_container_swap if such a type exists, otherwise an integral_constant
|
||||
//! type with internal constant static member <code>value</code> == false.
|
||||
//! Allocator::propagate_on_container_swap if such a type exists, otherwise a type
|
||||
//! with an internal constant static boolean member <code>value</code> == false.
|
||||
typedef see_documentation propagate_on_container_swap;
|
||||
//! Defines an allocator: Alloc::rebind<T>::other if such a type exists; otherwise, Alloc<T, Args>
|
||||
//! if Alloc is a class template instantiation of the form Alloc<U, Args>, where Args is zero or
|
||||
//! Allocator::is_always_equal if such a type exists, otherwise a type
|
||||
//! with an internal constant static boolean member <code>value</code> == is_empty<Allocator>::value
|
||||
typedef see_documentation is_always_equal;
|
||||
//! Allocator::is_partially_propagable if such a type exists, otherwise a type
|
||||
//! with an internal constant static boolean member <code>value</code> == false
|
||||
//! <b>Note</b>: Non-standard extension used to implement `small_vector_allocator`.
|
||||
typedef see_documentation is_partially_propagable;
|
||||
//! Defines an allocator: Allocator::rebind<T>::other if such a type exists; otherwise, Allocator<T, Args>
|
||||
//! if Allocator is a class template instantiation of the form Allocator<U, Args>, where Args is zero or
|
||||
//! more type arguments ; otherwise, the instantiation of rebind_alloc is ill-formed.
|
||||
//!
|
||||
//! In C++03 compilers <code>rebind_alloc</code> is a struct derived from an allocator
|
||||
|
@ -119,114 +179,121 @@ struct allocator_traits
|
|||
template <class T> using rebind_traits = allocator_traits<rebind_alloc<T> >;
|
||||
|
||||
//! Non-standard extension: Portable allocator rebind for C++03 and C++11 compilers.
|
||||
//! <code>type</code> is an allocator related to Alloc deduced deduced by rules explained in <code>rebind_alloc</code>.
|
||||
//! <code>type</code> is an allocator related to Allocator deduced deduced by rules explained in <code>rebind_alloc</code>.
|
||||
template <class T>
|
||||
struct portable_rebind_alloc
|
||||
{ typedef see_documentation type; };
|
||||
#else
|
||||
//pointer
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
pointer, value_type*)
|
||||
pointer;
|
||||
//const_pointer
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
const_pointer, typename boost::intrusive::pointer_traits<pointer>::template
|
||||
rebind_pointer<const value_type>)
|
||||
const_pointer;
|
||||
//reference
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
reference, typename container_detail::unvoid<value_type>::type&)
|
||||
reference;
|
||||
//const_reference
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
const_reference, const typename container_detail::unvoid<value_type>::type&)
|
||||
const_reference;
|
||||
//void_pointer
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
void_pointer, typename boost::intrusive::pointer_traits<pointer>::template
|
||||
rebind_pointer<void>)
|
||||
void_pointer;
|
||||
//const_void_pointer
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
const_void_pointer, typename boost::intrusive::pointer_traits<pointer>::template
|
||||
rebind_pointer<const void>)
|
||||
const_void_pointer;
|
||||
//difference_type
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
difference_type, std::ptrdiff_t)
|
||||
difference_type;
|
||||
//size_type
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
size_type, std::size_t)
|
||||
size_type;
|
||||
//propagate_on_container_copy_assignment
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
propagate_on_container_copy_assignment, container_detail::false_type)
|
||||
propagate_on_container_copy_assignment;
|
||||
//propagate_on_container_move_assignment
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
propagate_on_container_move_assignment, container_detail::false_type)
|
||||
propagate_on_container_move_assignment;
|
||||
//propagate_on_container_swap
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
propagate_on_container_swap, container_detail::false_type)
|
||||
propagate_on_container_swap;
|
||||
//is_always_equal
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
is_always_equal, container_detail::is_empty<Allocator>)
|
||||
is_always_equal;
|
||||
//is_partially_propagable
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator,
|
||||
is_partially_propagable, container_detail::false_type)
|
||||
is_partially_propagable;
|
||||
|
||||
//rebind_alloc & rebind_traits
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
//C++11
|
||||
template <typename T> using rebind_alloc = typename boost::intrusive::pointer_rebind<Alloc, T>::type;
|
||||
template <typename T> using rebind_alloc = typename boost::intrusive::pointer_rebind<Allocator, T>::type;
|
||||
template <typename T> using rebind_traits = allocator_traits< rebind_alloc<T> >;
|
||||
#else // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
//Some workaround for C++03 or C++11 compilers with no template aliases
|
||||
template <typename T>
|
||||
struct rebind_alloc : boost::intrusive::pointer_rebind<Alloc,T>::type
|
||||
struct rebind_alloc : boost::intrusive::pointer_rebind<Allocator,T>::type
|
||||
{
|
||||
typedef typename boost::intrusive::pointer_rebind<Alloc,T>::type Base;
|
||||
typedef typename boost::intrusive::pointer_rebind<Allocator,T>::type Base;
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
template <typename... Args>
|
||||
rebind_alloc(BOOST_FWD_REF(Args)... args)
|
||||
: Base(boost::forward<Args>(args)...)
|
||||
{}
|
||||
template <typename... Args>
|
||||
rebind_alloc(BOOST_FWD_REF(Args)... args) : Base(boost::forward<Args>(args)...) {}
|
||||
#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
#define BOOST_PP_LOCAL_MACRO(n) \
|
||||
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
||||
rebind_alloc(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
: Base(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)) \
|
||||
{} \
|
||||
//
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
#include BOOST_PP_LOCAL_ITERATE()
|
||||
#define BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC(N) \
|
||||
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\
|
||||
explicit rebind_alloc(BOOST_MOVE_UREF##N) : Base(BOOST_MOVE_FWD##N){}\
|
||||
//
|
||||
BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC)
|
||||
#undef BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC
|
||||
#endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct rebind_traits
|
||||
: allocator_traits<typename boost::intrusive::pointer_rebind<Alloc, T>::type>
|
||||
: allocator_traits<typename boost::intrusive::pointer_rebind<Allocator, T>::type>
|
||||
{};
|
||||
#endif // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
|
||||
//portable_rebind_alloc
|
||||
template <class T>
|
||||
struct portable_rebind_alloc
|
||||
{ typedef typename boost::intrusive::pointer_rebind<Alloc, T>::type type; };
|
||||
{ typedef typename boost::intrusive::pointer_rebind<Allocator, T>::type type; };
|
||||
#endif //BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
//! <b>Returns</b>: <code>a.allocate(n)</code>
|
||||
//!
|
||||
static pointer allocate(Alloc &a, size_type n)
|
||||
static pointer allocate(Allocator &a, size_type n)
|
||||
{ return a.allocate(n); }
|
||||
|
||||
//! <b>Returns</b>: <code>a.deallocate(p, n)</code>
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing
|
||||
static void deallocate(Alloc &a, pointer p, size_type n)
|
||||
static void deallocate(Allocator &a, pointer p, size_type n)
|
||||
{ a.deallocate(p, n); }
|
||||
|
||||
//! <b>Effects</b>: calls <code>a.allocate(n, p)</code> if that call is well-formed;
|
||||
//! otherwise, invokes <code>a.allocate(n)</code>
|
||||
static pointer allocate(Alloc &a, size_type n, const_void_pointer p)
|
||||
static pointer allocate(Allocator &a, size_type n, const_void_pointer p)
|
||||
{
|
||||
const bool value = boost::container::container_detail::
|
||||
has_member_function_callable_with_allocate
|
||||
<Alloc, const size_type, const const_void_pointer>::value;
|
||||
<Allocator, const size_type, const const_void_pointer>::value;
|
||||
container_detail::bool_<value> flag;
|
||||
return allocator_traits::priv_allocate(flag, a, n, p);
|
||||
}
|
||||
|
@ -234,46 +301,35 @@ struct allocator_traits
|
|||
//! <b>Effects</b>: calls <code>a.destroy(p)</code> if that call is well-formed;
|
||||
//! otherwise, invokes <code>p->~T()</code>.
|
||||
template<class T>
|
||||
static void destroy(Alloc &a, T*p) BOOST_CONTAINER_NOEXCEPT
|
||||
static void destroy(Allocator &a, T*p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
typedef T* destroy_pointer;
|
||||
const bool value = boost::container::container_detail::
|
||||
has_member_function_callable_with_destroy
|
||||
<Alloc, const destroy_pointer>::value;
|
||||
<Allocator, const destroy_pointer>::value;
|
||||
container_detail::bool_<value> flag;
|
||||
allocator_traits::priv_destroy(flag, a, p);
|
||||
}
|
||||
|
||||
//! <b>Returns</b>: <code>a.max_size()</code> if that expression is well-formed; otherwise,
|
||||
//! <code>numeric_limits<size_type>::max()</code>.
|
||||
static size_type max_size(const Alloc &a) BOOST_CONTAINER_NOEXCEPT
|
||||
static size_type max_size(const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
const bool value = boost::container::container_detail::
|
||||
has_member_function_callable_with_max_size
|
||||
<const Alloc>::value;
|
||||
const bool value = allocator_traits_detail::has_max_size<Allocator, size_type (Allocator::*)() const>::value;
|
||||
container_detail::bool_<value> flag;
|
||||
return allocator_traits::priv_max_size(flag, a);
|
||||
}
|
||||
|
||||
//! <b>Returns</b>: <code>a.select_on_container_copy_construction()</code> if that expression is well-formed;
|
||||
//! otherwise, a.
|
||||
static
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
typename container_detail::if_c
|
||||
< boost::container::container_detail::
|
||||
has_member_function_callable_with_select_on_container_copy_construction
|
||||
<const Alloc>::value
|
||||
, Alloc
|
||||
, const Alloc &
|
||||
>::type
|
||||
#else
|
||||
Alloc
|
||||
#endif
|
||||
select_on_container_copy_construction(const Alloc &a)
|
||||
static BOOST_CONTAINER_DOC1ST(Allocator,
|
||||
typename container_detail::if_c
|
||||
< allocator_traits_detail::has_select_on_container_copy_construction<Allocator BOOST_MOVE_I Allocator (Allocator::*)() const>::value
|
||||
BOOST_MOVE_I Allocator BOOST_MOVE_I const Allocator & >::type)
|
||||
select_on_container_copy_construction(const Allocator &a)
|
||||
{
|
||||
const bool value = boost::container::container_detail::
|
||||
has_member_function_callable_with_select_on_container_copy_construction
|
||||
<const Alloc>::value;
|
||||
const bool value = allocator_traits_detail::has_select_on_container_copy_construction
|
||||
<Allocator, Allocator (Allocator::*)() const>::value;
|
||||
container_detail::bool_<value> flag;
|
||||
return allocator_traits::priv_select_on_container_copy_construction(flag, a);
|
||||
}
|
||||
|
@ -282,123 +338,149 @@ struct allocator_traits
|
|||
//! <b>Effects</b>: calls <code>a.construct(p, std::forward<Args>(args)...)</code> if that call is well-formed;
|
||||
//! otherwise, invokes <code>::new (static_cast<void*>(p)) T(std::forward<Args>(args)...)</code>
|
||||
template <class T, class ...Args>
|
||||
static void construct(Alloc & a, T* p, BOOST_FWD_REF(Args)... args)
|
||||
static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args)
|
||||
{
|
||||
container_detail::bool_<container_detail::is_std_allocator<Alloc>::value> flag;
|
||||
container_detail::bool_<container_detail::is_std_allocator<Allocator>::value> flag;
|
||||
allocator_traits::priv_construct(flag, a, p, ::boost::forward<Args>(args)...);
|
||||
}
|
||||
#endif
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
//! <b>Returns</b>: <code>a.storage_is_unpropagable(p)</code> if is_partially_propagable::value is true; otherwise,
|
||||
//! <code>false</code>.
|
||||
static bool storage_is_unpropagable(const Allocator &a, pointer p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
container_detail::bool_<is_partially_propagable::value> flag;
|
||||
return allocator_traits::priv_storage_is_unpropagable(flag, a, p);
|
||||
}
|
||||
|
||||
//! <b>Returns</b>: <code>true</code> if <code>is_always_equal::value == true</code>, otherwise,
|
||||
//! <code>a == b</code>.
|
||||
static bool equal(const Allocator &a, const Allocator &b) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
container_detail::bool_<is_always_equal::value> flag;
|
||||
return allocator_traits::priv_equal(flag, a, b);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
private:
|
||||
static pointer priv_allocate(container_detail::true_type, Allocator &a, size_type n, const_void_pointer p)
|
||||
{ return a.allocate(n, p); }
|
||||
|
||||
static pointer priv_allocate(container_detail::false_type, Allocator &a, size_type n, const_void_pointer)
|
||||
{ return a.allocate(n); }
|
||||
|
||||
template<class T>
|
||||
static void priv_destroy(container_detail::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ a.destroy(p); }
|
||||
|
||||
template<class T>
|
||||
static void priv_destroy(container_detail::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ p->~T(); (void)p; }
|
||||
|
||||
static size_type priv_max_size(container_detail::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return a.max_size(); }
|
||||
|
||||
static size_type priv_max_size(container_detail::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return size_type(-1)/sizeof(value_type); }
|
||||
|
||||
static Allocator priv_select_on_container_copy_construction(container_detail::true_type, const Allocator &a)
|
||||
{ return a.select_on_container_copy_construction(); }
|
||||
|
||||
static const Allocator &priv_select_on_container_copy_construction(container_detail::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return a; }
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
template<class T, class ...Args>
|
||||
static void priv_construct(container_detail::false_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
{
|
||||
const bool value = boost::container::container_detail::
|
||||
has_member_function_callable_with_construct
|
||||
< Allocator, T*, Args... >::value;
|
||||
container_detail::bool_<value> flag;
|
||||
(priv_construct_dispatch_next)(flag, a, p, ::boost::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template<class T, class ...Args>
|
||||
static void priv_construct(container_detail::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
{ (priv_construct_dispatch_next)(container_detail::false_type(), a, p, ::boost::forward<Args>(args)...); }
|
||||
|
||||
template<class T, class ...Args>
|
||||
static void priv_construct_dispatch_next(container_detail::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
{ a.construct( p, ::boost::forward<Args>(args)...); }
|
||||
|
||||
template<class T, class ...Args>
|
||||
static void priv_construct_dispatch_next(container_detail::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
{ ::new((void*)p, boost_container_new_t()) T(::boost::forward<Args>(args)...); }
|
||||
#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
public:
|
||||
|
||||
#define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL(N) \
|
||||
template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
|
||||
static void construct(Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
{\
|
||||
container_detail::bool_<container_detail::is_std_allocator<Allocator>::value> flag;\
|
||||
(priv_construct)(flag, a, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
||||
}\
|
||||
//
|
||||
BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL)
|
||||
#undef BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL
|
||||
|
||||
private:
|
||||
static pointer priv_allocate(container_detail::true_type, Alloc &a, size_type n, const_void_pointer p)
|
||||
{ return a.allocate(n, p); }
|
||||
|
||||
static pointer priv_allocate(container_detail::false_type, Alloc &a, size_type n, const_void_pointer)
|
||||
{ return allocator_traits::allocate(a, n); }
|
||||
//////////////////
|
||||
// priv_construct
|
||||
//////////////////
|
||||
#define BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL(N) \
|
||||
template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
|
||||
static void priv_construct(container_detail::false_type, Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
{\
|
||||
const bool value = boost::container::container_detail::has_member_function_callable_with_construct\
|
||||
< Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_FWD_T##N>::value;\
|
||||
container_detail::bool_<value> flag;\
|
||||
(priv_construct_dispatch_next)(flag, a, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
||||
}\
|
||||
\
|
||||
template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
|
||||
static void priv_construct(container_detail::true_type, Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
{ (priv_construct_dispatch_next)(container_detail::false_type(), a, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
|
||||
//
|
||||
BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL)
|
||||
#undef BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL
|
||||
|
||||
template<class T>
|
||||
static void priv_destroy(container_detail::true_type, Alloc &a, T* p) BOOST_CONTAINER_NOEXCEPT
|
||||
{ a.destroy(p); }
|
||||
/////////////////////////////////
|
||||
// priv_construct_dispatch_next
|
||||
/////////////////////////////////
|
||||
#define BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_DISPATCH_NEXT_IMPL(N) \
|
||||
template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
|
||||
static void priv_construct_dispatch_next(container_detail::true_type, Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
{ a.construct( p BOOST_MOVE_I##N BOOST_MOVE_FWD##N ); }\
|
||||
\
|
||||
template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
|
||||
static void priv_construct_dispatch_next(container_detail::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
{ ::new((void*)p, boost_container_new_t()) T(BOOST_MOVE_FWD##N); }\
|
||||
//
|
||||
BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_DISPATCH_NEXT_IMPL)
|
||||
#undef BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_DISPATCH_NEXT_IMPL
|
||||
|
||||
template<class T>
|
||||
static void priv_destroy(container_detail::false_type, Alloc &, T* p) BOOST_CONTAINER_NOEXCEPT
|
||||
{ p->~T(); (void)p; }
|
||||
#endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
static size_type priv_max_size(container_detail::true_type, const Alloc &a) BOOST_CONTAINER_NOEXCEPT
|
||||
{ return a.max_size(); }
|
||||
template<class T>
|
||||
static void priv_construct_dispatch_next(container_detail::false_type, Allocator &, T *p, const ::boost::container::default_init_t&)
|
||||
{ ::new((void*)p) T; }
|
||||
|
||||
static size_type priv_max_size(container_detail::false_type, const Alloc &) BOOST_CONTAINER_NOEXCEPT
|
||||
{ return size_type(-1); }
|
||||
static bool priv_storage_is_unpropagable(container_detail::true_type, const Allocator &a, pointer p)
|
||||
{ return a.storage_is_unpropagable(p); }
|
||||
|
||||
static Alloc priv_select_on_container_copy_construction(container_detail::true_type, const Alloc &a)
|
||||
{ return a.select_on_container_copy_construction(); }
|
||||
static bool priv_storage_is_unpropagable(container_detail::false_type, const Allocator &, pointer)
|
||||
{ return false; }
|
||||
|
||||
static const Alloc &priv_select_on_container_copy_construction(container_detail::false_type, const Alloc &a) BOOST_CONTAINER_NOEXCEPT
|
||||
{ return a; }
|
||||
static bool priv_equal(container_detail::true_type, const Allocator &, const Allocator &)
|
||||
{ return true; }
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
template<class T, class ...Args>
|
||||
static void priv_construct(container_detail::false_type, Alloc &a, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
{
|
||||
const bool value = boost::container::container_detail::
|
||||
has_member_function_callable_with_construct
|
||||
< Alloc, T*, Args... >::value;
|
||||
container_detail::bool_<value> flag;
|
||||
priv_construct_dispatch2(flag, a, p, ::boost::forward<Args>(args)...);
|
||||
}
|
||||
static bool priv_equal(container_detail::false_type, const Allocator &a, const Allocator &b)
|
||||
{ return a == b; }
|
||||
|
||||
template<class T, class ...Args>
|
||||
static void priv_construct(container_detail::true_type, Alloc &a, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
{
|
||||
priv_construct_dispatch2(container_detail::false_type(), a, p, ::boost::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template<class T, class ...Args>
|
||||
static void priv_construct_dispatch2(container_detail::true_type, Alloc &a, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
{ a.construct( p, ::boost::forward<Args>(args)...); }
|
||||
|
||||
template<class T, class ...Args>
|
||||
static void priv_construct_dispatch2(container_detail::false_type, Alloc &, T *p, BOOST_FWD_REF(Args) ...args)
|
||||
{ ::new((void*)p, boost_container_new_t()) T(::boost::forward<Args>(args)...); }
|
||||
#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
public:
|
||||
#define BOOST_PP_LOCAL_MACRO(n) \
|
||||
template<class T BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) > \
|
||||
static void construct(Alloc &a, T *p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ \
|
||||
container_detail::bool_ \
|
||||
<container_detail::is_std_allocator<Alloc>::value> flag; \
|
||||
allocator_traits::priv_construct(flag, a, p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); \
|
||||
} \
|
||||
//
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
#include BOOST_PP_LOCAL_ITERATE()
|
||||
|
||||
private:
|
||||
#define BOOST_PP_LOCAL_MACRO(n) \
|
||||
template<class T BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) > \
|
||||
static void priv_construct(container_detail::false_type, Alloc &a, T *p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST,_)) \
|
||||
{ \
|
||||
const bool value = \
|
||||
boost::container::container_detail::has_member_function_callable_with_construct \
|
||||
< Alloc, T* BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_FWD_TYPE, _) >::value; \
|
||||
container_detail::bool_<value> flag; \
|
||||
priv_construct_dispatch2(flag, a, p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) ); \
|
||||
} \
|
||||
\
|
||||
template<class T BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) > \
|
||||
static void priv_construct(container_detail::true_type, Alloc &a, T *p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST,_)) \
|
||||
{ \
|
||||
priv_construct_dispatch2(container_detail::false_type(), a, p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) ); \
|
||||
} \
|
||||
\
|
||||
template<class T BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) > \
|
||||
static void priv_construct_dispatch2(container_detail::true_type, Alloc &a, T *p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST,_)) \
|
||||
{ a.construct( p BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) ); } \
|
||||
\
|
||||
template<class T BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) > \
|
||||
static void priv_construct_dispatch2(container_detail::false_type, Alloc &, T *p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _) ) \
|
||||
{ ::new((void*)p, boost_container_new_t()) T(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }\
|
||||
//
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
#include BOOST_PP_LOCAL_ITERATE()
|
||||
#endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template<class T>
|
||||
static void priv_construct_dispatch2(container_detail::false_type, Alloc &, T *p, ::boost::container::default_init_t)
|
||||
{ ::new((void*)p) T; }
|
||||
#endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
};
|
||||
|
||||
} //namespace container {
|
||||
|
|
|
@ -11,7 +11,11 @@
|
|||
#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
|
||||
#define BOOST_CONTAINER_CONTAINER_FWD_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
|
@ -80,27 +84,34 @@ enum tree_type_enum
|
|||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
template<class T>
|
||||
class new_allocator;
|
||||
|
||||
template <class T
|
||||
,class Allocator = std::allocator<T> >
|
||||
,class Allocator = new_allocator<T> >
|
||||
class vector;
|
||||
|
||||
template <class T
|
||||
,class Allocator = std::allocator<T> >
|
||||
,class Allocator = new_allocator<T> >
|
||||
class stable_vector;
|
||||
|
||||
template <class T, std::size_t Capacity>
|
||||
class static_vector;
|
||||
|
||||
template < class T, std::size_t N
|
||||
, class Allocator= new_allocator<T> >
|
||||
class small_vector;
|
||||
|
||||
template <class T
|
||||
,class Allocator = std::allocator<T> >
|
||||
,class Allocator = new_allocator<T> >
|
||||
class deque;
|
||||
|
||||
template <class T
|
||||
,class Allocator = std::allocator<T> >
|
||||
,class Allocator = new_allocator<T> >
|
||||
class list;
|
||||
|
||||
template <class T
|
||||
,class Allocator = std::allocator<T> >
|
||||
,class Allocator = new_allocator<T> >
|
||||
class slist;
|
||||
|
||||
template<tree_type_enum TreeType, bool OptimizeSize>
|
||||
|
@ -110,67 +121,67 @@ typedef tree_opt<red_black_tree, true> tree_assoc_defaults;
|
|||
|
||||
template <class Key
|
||||
,class Compare = std::less<Key>
|
||||
,class Allocator = std::allocator<Key>
|
||||
,class Allocator = new_allocator<Key>
|
||||
,class Options = tree_assoc_defaults >
|
||||
class set;
|
||||
|
||||
template <class Key
|
||||
,class Compare = std::less<Key>
|
||||
,class Allocator = std::allocator<Key>
|
||||
,class Allocator = new_allocator<Key>
|
||||
,class Options = tree_assoc_defaults >
|
||||
class multiset;
|
||||
|
||||
template <class Key
|
||||
,class T
|
||||
,class Compare = std::less<Key>
|
||||
,class Allocator = std::allocator<std::pair<const Key, T> >
|
||||
,class Allocator = new_allocator<std::pair<const Key, T> >
|
||||
,class Options = tree_assoc_defaults >
|
||||
class map;
|
||||
|
||||
template <class Key
|
||||
,class T
|
||||
,class Compare = std::less<Key>
|
||||
,class Allocator = std::allocator<std::pair<const Key, T> >
|
||||
,class Allocator = new_allocator<std::pair<const Key, T> >
|
||||
,class Options = tree_assoc_defaults >
|
||||
class multimap;
|
||||
|
||||
template <class Key
|
||||
,class Compare = std::less<Key>
|
||||
,class Allocator = std::allocator<Key> >
|
||||
,class Allocator = new_allocator<Key> >
|
||||
class flat_set;
|
||||
|
||||
template <class Key
|
||||
,class Compare = std::less<Key>
|
||||
,class Allocator = std::allocator<Key> >
|
||||
,class Allocator = new_allocator<Key> >
|
||||
class flat_multiset;
|
||||
|
||||
template <class Key
|
||||
,class T
|
||||
,class Compare = std::less<Key>
|
||||
,class Allocator = std::allocator<std::pair<Key, T> > >
|
||||
,class Allocator = new_allocator<std::pair<Key, T> > >
|
||||
class flat_map;
|
||||
|
||||
template <class Key
|
||||
,class T
|
||||
,class Compare = std::less<Key>
|
||||
,class Allocator = std::allocator<std::pair<Key, T> > >
|
||||
,class Allocator = new_allocator<std::pair<Key, T> > >
|
||||
class flat_multimap;
|
||||
|
||||
template <class CharT
|
||||
,class Traits = std::char_traits<CharT>
|
||||
,class Allocator = std::allocator<CharT> >
|
||||
,class Allocator = new_allocator<CharT> >
|
||||
class basic_string;
|
||||
|
||||
typedef basic_string
|
||||
<char
|
||||
,std::char_traits<char>
|
||||
,std::allocator<char> >
|
||||
,new_allocator<char> >
|
||||
string;
|
||||
|
||||
typedef basic_string
|
||||
<wchar_t
|
||||
,std::char_traits<wchar_t>
|
||||
,std::allocator<wchar_t> >
|
||||
,new_allocator<wchar_t> >
|
||||
wstring;
|
||||
|
||||
static const std::size_t ADP_nodes_per_block = 256u;
|
||||
|
|
|
@ -17,32 +17,34 @@
|
|||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4702) // unreachable code
|
||||
#pragma warning (disable : 4706) // assignment within conditional expression
|
||||
#pragma warning (disable : 4127) // conditional expression is constant
|
||||
#pragma warning (disable : 4146) // unary minus operator applied to unsigned type, result still unsigned
|
||||
#pragma warning (disable : 4284) // odd return type for operator->
|
||||
#pragma warning (disable : 4197) // top-level volatile in cast is ignored
|
||||
#pragma warning (disable : 4244) // possible loss of data
|
||||
#pragma warning (disable : 4251) // "identifier" : class "type" needs to have dll-interface to be used by clients of class "type2"
|
||||
#pragma warning (disable : 4267) // conversion from "X" to "Y", possible loss of data
|
||||
#pragma warning (disable : 4275) // non DLL-interface classkey "identifier" used as base for DLL-interface classkey "identifier"
|
||||
#pragma warning (disable : 4284) // odd return type for operator->
|
||||
#pragma warning (disable : 4324) // structure was padded due to __declspec(align(
|
||||
#pragma warning (disable : 4345) // behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized
|
||||
#pragma warning (disable : 4355) // "this" : used in base member initializer list
|
||||
#pragma warning (disable : 4503) // "identifier" : decorated name length exceeded, name was truncated
|
||||
#pragma warning (disable : 4510) // default constructor could not be generated
|
||||
#pragma warning (disable : 4511) // copy constructor could not be generated
|
||||
#pragma warning (disable : 4512) // assignment operator could not be generated
|
||||
#pragma warning (disable : 4514) // unreferenced inline removed
|
||||
#pragma warning (disable : 4521) // Disable "multiple copy constructors specified"
|
||||
#pragma warning (disable : 4522) // "class" : multiple assignment operators specified
|
||||
#pragma warning (disable : 4541) // 'typeid' used on polymorphic type '' with /GR-; unpredictable behavior may result
|
||||
#pragma warning (disable : 4584) // X is already a base-class of Y
|
||||
#pragma warning (disable : 4610) // struct can never be instantiated - user defined constructor required
|
||||
#pragma warning (disable : 4671) // the copy constructor is inaccessible
|
||||
#pragma warning (disable : 4673) // throwing '' the following types will not be considered at the catch site
|
||||
#pragma warning (disable : 4675) // "method" should be declared "static" and have exactly one parameter
|
||||
#pragma warning (disable : 4702) // unreachable code
|
||||
#pragma warning (disable : 4706) // assignment within conditional expression
|
||||
#pragma warning (disable : 4710) // function not inlined
|
||||
#pragma warning (disable : 4711) // function selected for automatic inline expansion
|
||||
#pragma warning (disable : 4786) // identifier truncated in debug info
|
||||
#pragma warning (disable : 4996) // "function": was declared deprecated
|
||||
#pragma warning (disable : 4197) // top-level volatile in cast is ignored
|
||||
#pragma warning (disable : 4541) // 'typeid' used on polymorphic type 'boost::exception'
|
||||
// with /GR-; unpredictable behavior may result
|
||||
#pragma warning (disable : 4673) // throwing '' the following types will not be considered at the catch site
|
||||
#pragma warning (disable : 4671) // the copy constructor is inaccessible
|
||||
#pragma warning (disable : 4584) // X is already a base-class of Y
|
||||
#pragma warning (disable : 4510) // default constructor could not be generated
|
||||
#endif //BOOST_MSVC
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2011-2013. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_ALLOCATOR_MEMORY_UTIL_HPP
|
||||
#define BOOST_CONTAINER_ALLOCATOR_MEMORY_UTIL_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/container/detail/config_begin.hpp>
|
||||
#include <boost/container/detail/workaround.hpp>
|
||||
|
||||
#include <boost/container/detail/preprocessor.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (2, 2, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME destroy
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME max_size
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 0, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME select_on_container_copy_construction
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 0, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME construct
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#ifdef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_SINGLE_ITERATION
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#else
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 (3, (1, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS+1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#endif
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME swap
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(pointer)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_pointer)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_reference)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(void_pointer)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_void_pointer)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(size_type)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_copy_assignment)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_move_assignment)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_swap)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(value_compare)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(wrapped_value_compare)
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
#endif // ! defined(BOOST_CONTAINER_ALLOCATOR_MEMORY_UTIL_HPP)
|
|
@ -13,7 +13,11 @@
|
|||
#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
|
||||
#define BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
|
@ -40,6 +44,13 @@ struct bool_ : integral_constant<bool, C_>
|
|||
operator bool() const { return bool_::value; }
|
||||
};
|
||||
|
||||
template< unsigned V_ >
|
||||
struct unsigned_ : integral_constant<unsigned, V_>
|
||||
{
|
||||
static const unsigned value = V_;
|
||||
operator unsigned() const { return unsigned_::value; }
|
||||
};
|
||||
|
||||
typedef bool_<true> true_;
|
||||
typedef bool_<false> false_;
|
||||
|
||||
|
@ -169,6 +180,12 @@ struct ls_zeros<1>
|
|||
static const std::size_t value = 0;
|
||||
};
|
||||
|
||||
template <std::size_t OrigSize, std::size_t RoundTo>
|
||||
struct ct_rounded_size
|
||||
{
|
||||
static const std::size_t value = ((OrigSize-1)/RoundTo+1)*RoundTo;
|
||||
};
|
||||
|
||||
template <typename T> struct unvoid { typedef T type; };
|
||||
template <> struct unvoid<void> { struct type { }; };
|
||||
template <> struct unvoid<const void> { struct type { }; };
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef BOOST_CONTAINER_DETAIL_PLACEMENT_NEW_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_PLACEMENT_NEW_HPP
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
@ -8,10 +10,11 @@
|
|||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_DETAIL_PLACEMENT_NEW_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_PLACEMENT_NEW_HPP
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,228 +0,0 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2008-2013. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_DETAIL_PREPROCESSOR_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_PREPROCESSOR_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/container/detail/config_begin.hpp>
|
||||
#include <boost/container/detail/workaround.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
//#error "This file is not needed when perfect forwarding is available"
|
||||
#endif //BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
|
||||
#include <boost/preprocessor/iteration/local.hpp>
|
||||
#include <boost/preprocessor/punctuation/paren_if.hpp>
|
||||
#include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||
#include <boost/preprocessor/control/expr_if.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/repetition/enum.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_trailing.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat.hpp>
|
||||
#include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
#include <boost/preprocessor/arithmetic/add.hpp>
|
||||
#include <boost/preprocessor/iteration/iterate.hpp>
|
||||
|
||||
#define BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS 10
|
||||
|
||||
//Note:
|
||||
//We define template parameters as const references to
|
||||
//be able to bind temporaries. After that we will un-const them.
|
||||
//This cast is ugly but it is necessary until "perfect forwarding"
|
||||
//is achieved in C++0x. Meanwhile, if we want to be able to
|
||||
//bind rvalues with non-const references, we have to be ugly
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_CONTAINER_PP_PARAM_LIST(z, n, data) \
|
||||
BOOST_PP_CAT(P, n) && BOOST_PP_CAT(p, n) \
|
||||
//!
|
||||
#else
|
||||
#define BOOST_CONTAINER_PP_PARAM_LIST(z, n, data) \
|
||||
const BOOST_PP_CAT(P, n) & BOOST_PP_CAT(p, n) \
|
||||
//!
|
||||
#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
#define BOOST_CONTAINER_PP_CONST_REF_PARAM_LIST_Q(z, n, Data) \
|
||||
const BOOST_PP_CAT(Q, n) & BOOST_PP_CAT(q, n) \
|
||||
//!
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_CONTAINER_PP_PARAM(U, u) \
|
||||
U && u \
|
||||
//!
|
||||
#else
|
||||
#define BOOST_CONTAINER_PP_PARAM(U, u) \
|
||||
const U & u \
|
||||
//!
|
||||
#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_INIT(z, n, data) \
|
||||
BOOST_PP_CAT(m_p, n) (::boost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(p, n) )) \
|
||||
//!
|
||||
|
||||
#else //BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_INIT(z, n, data) \
|
||||
BOOST_PP_CAT(m_p, n) (const_cast<BOOST_PP_CAT(P, n) &>(BOOST_PP_CAT(p, n))) \
|
||||
//!
|
||||
#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
#if defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
template<class T>
|
||||
struct ref_holder;
|
||||
|
||||
template<class T>
|
||||
struct ref_holder<T &>
|
||||
{
|
||||
explicit ref_holder(T &t)
|
||||
: t_(t)
|
||||
{}
|
||||
T &t_;
|
||||
T & get() { return t_; }
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct ref_holder<const T>
|
||||
{
|
||||
explicit ref_holder(const T &t)
|
||||
: t_(t)
|
||||
{}
|
||||
const T &t_;
|
||||
const T & get() { return t_; }
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct ref_holder<const T &&>
|
||||
{
|
||||
explicit ref_holder(const T &t)
|
||||
: t_(t)
|
||||
{}
|
||||
const T &t_;
|
||||
const T & get() { return t_; }
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct ref_holder
|
||||
{
|
||||
explicit ref_holder(T &&t)
|
||||
: t_(t)
|
||||
{}
|
||||
T &t_;
|
||||
T && get() { return ::boost::move(t_); }
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct ref_holder<T &&>
|
||||
{
|
||||
explicit ref_holder(T &&t)
|
||||
: t_(t)
|
||||
{}
|
||||
T &t_;
|
||||
T && get() { return ::boost::move(t_); }
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_DEFINE(z, n, data) \
|
||||
::boost::container::container_detail::ref_holder<BOOST_PP_CAT(P, n)> BOOST_PP_CAT(m_p, n); \
|
||||
//!
|
||||
|
||||
#else //BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_DEFINE(z, n, data) \
|
||||
BOOST_PP_CAT(P, n) && BOOST_PP_CAT(m_p, n); \
|
||||
//!
|
||||
|
||||
#endif //defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
#else //BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_DEFINE(z, n, data) \
|
||||
BOOST_PP_CAT(P, n) & BOOST_PP_CAT(m_p, n); \
|
||||
//!
|
||||
#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
#define BOOST_CONTAINER_PP_MEMBER_FORWARD(z, n, data) BOOST_PP_CAT(this->m_p, n).get() \
|
||||
//!
|
||||
|
||||
#else //!defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
#define BOOST_CONTAINER_PP_MEMBER_FORWARD(z, n, data) \
|
||||
::boost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(this->m_p, n) ) \
|
||||
//!
|
||||
|
||||
#endif //!defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_INC(z, n, data) \
|
||||
BOOST_PP_CAT(++this->m_p, n) \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_IDENTITY(z, n, data) data
|
||||
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_FORWARD(z, n, data) \
|
||||
::boost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(p, n) ) \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_DECLVAL(z, n, data) \
|
||||
::boost::move_detail::declval< BOOST_PP_CAT(P, n) >() \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_MEMBER_IT_FORWARD(z, n, data) \
|
||||
BOOST_PP_CAT(*this->m_p, n) \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_TEMPLATE_PARAM_VOID_DEFAULT(z, n, data) \
|
||||
BOOST_PP_CAT(class P, n) = void \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_TEMPLATE_PARAM_WITH_DEFAULT(z, n, default_type) \
|
||||
BOOST_PP_CAT(class P, n) = default_type \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_STATIC_PARAM_REF_DECLARE(z, n, data) \
|
||||
static BOOST_PP_CAT(P, n) & BOOST_PP_CAT(p, n); \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_PARAM_PASS(z, n, data) \
|
||||
BOOST_PP_CAT(p, n) \
|
||||
//!
|
||||
|
||||
#define BOOST_CONTAINER_PP_FWD_TYPE(z, n, data) \
|
||||
typename ::boost::move_detail::forward_type< BOOST_PP_CAT(P, n) >::type \
|
||||
//!
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
//#else
|
||||
|
||||
//#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
//#error "This file is not needed when perfect forwarding is available"
|
||||
//#endif //BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DETAIL_PREPROCESSOR_HPP
|
|
@ -11,7 +11,11 @@
|
|||
#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_STD_FWD_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
|
@ -25,6 +29,12 @@
|
|||
#pragma GCC diagnostic ignored "-Wc++11-extensions"
|
||||
#define BOOST_CONTAINER_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
#define BOOST_CONTAINER_STD_NS_END _LIBCPP_END_NAMESPACE_STD
|
||||
#elif defined(BOOST_GNU_STDLIB) && defined(_GLIBCXX_BEGIN_NAMESPACE_VERSION) //GCC >= 4.6
|
||||
#define BOOST_CONTAINER_STD_NS_BEG namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
#define BOOST_CONTAINER_STD_NS_END _GLIBCXX_END_NAMESPACE_VERSION } // namespace
|
||||
#elif defined(BOOST_GNU_STDLIB) && defined(_GLIBCXX_BEGIN_NAMESPACE) //GCC >= 4.2
|
||||
#define BOOST_CONTAINER_STD_NS_BEG _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
#define BOOST_CONTAINER_STD_NS_END _GLIBCXX_END_NAMESPACE
|
||||
#else
|
||||
#define BOOST_CONTAINER_STD_NS_BEG namespace std{
|
||||
#define BOOST_CONTAINER_STD_NS_END }
|
||||
|
@ -49,6 +59,11 @@ struct forward_iterator_tag;
|
|||
struct bidirectional_iterator_tag;
|
||||
struct random_access_iterator_tag;
|
||||
|
||||
template<class Container>
|
||||
class insert_iterator;
|
||||
|
||||
struct allocator_arg_t;
|
||||
|
||||
BOOST_CONTAINER_STD_NS_END
|
||||
|
||||
#ifdef BOOST_CONTAINER_CLANG_INLINE_STD_NS
|
||||
|
|
67
miniboost/boost/container/detail/type_traits.hpp
Normal file
67
miniboost/boost/container/detail/type_traits.hpp
Normal file
|
@ -0,0 +1,67 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
// (C) Copyright John Maddock 2000.
|
||||
// (C) Copyright Ion Gaztanaga 2005-2015.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
// The alignment and Type traits implementation comes from
|
||||
// John Maddock's TypeTraits library.
|
||||
//
|
||||
// Some other tricks come from Howard Hinnant's papers and StackOverflow replies
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP
|
||||
#define BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/type_traits.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
|
||||
using ::boost::move_detail::is_same;
|
||||
using ::boost::move_detail::is_pointer;
|
||||
using ::boost::move_detail::add_reference;
|
||||
using ::boost::move_detail::add_const;
|
||||
using ::boost::move_detail::add_const_reference;
|
||||
using ::boost::move_detail::remove_const;
|
||||
using ::boost::move_detail::remove_reference;
|
||||
using ::boost::move_detail::make_unsigned;
|
||||
using ::boost::move_detail::is_floating_point;
|
||||
using ::boost::move_detail::is_integral;
|
||||
using ::boost::move_detail::is_enum;
|
||||
using ::boost::move_detail::is_pod;
|
||||
using ::boost::move_detail::is_empty;
|
||||
using ::boost::move_detail::is_trivially_destructible;
|
||||
using ::boost::move_detail::is_trivially_default_constructible;
|
||||
using ::boost::move_detail::is_trivially_copy_constructible;
|
||||
using ::boost::move_detail::is_trivially_move_constructible;
|
||||
using ::boost::move_detail::is_trivially_copy_assignable;
|
||||
using ::boost::move_detail::is_trivially_move_assignable;
|
||||
using ::boost::move_detail::is_nothrow_default_constructible;
|
||||
using ::boost::move_detail::is_nothrow_copy_constructible;
|
||||
using ::boost::move_detail::is_nothrow_move_constructible;
|
||||
using ::boost::move_detail::is_nothrow_copy_assignable;
|
||||
using ::boost::move_detail::is_nothrow_move_assignable;
|
||||
using ::boost::move_detail::is_nothrow_swappable;
|
||||
using ::boost::move_detail::alignment_of;
|
||||
using ::boost::move_detail::aligned_storage;
|
||||
using ::boost::move_detail::nat;
|
||||
using ::boost::move_detail::max_align_t;
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP
|
|
@ -11,7 +11,11 @@
|
|||
#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
|
@ -22,18 +26,6 @@
|
|||
#define BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_NO_CXX11_NOEXCEPT)
|
||||
#if defined(BOOST_MSVC)
|
||||
#define BOOST_CONTAINER_NOEXCEPT throw()
|
||||
#else
|
||||
#define BOOST_CONTAINER_NOEXCEPT
|
||||
#endif
|
||||
#define BOOST_CONTAINER_NOEXCEPT_IF(x)
|
||||
#else
|
||||
#define BOOST_CONTAINER_NOEXCEPT noexcept
|
||||
#define BOOST_CONTAINER_NOEXCEPT_IF(x) noexcept(x)
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && defined(__GXX_EXPERIMENTAL_CXX0X__)\
|
||||
&& (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40700)
|
||||
#define BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST
|
||||
|
|
|
@ -107,7 +107,7 @@ template<class T>
|
|||
BOOST_FORCEINLINE
|
||||
T * addressof( T & v )
|
||||
{
|
||||
#if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || defined( __SUNPRO_CC )
|
||||
#if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5120))
|
||||
|
||||
return boost::detail::addressof_impl<T>::f( v, 0 );
|
||||
|
||||
|
|
40
miniboost/boost/core/is_same.hpp
Normal file
40
miniboost/boost/core/is_same.hpp
Normal file
|
@ -0,0 +1,40 @@
|
|||
#ifndef BOOST_CORE_IS_SAME_HPP_INCLUDED
|
||||
#define BOOST_CORE_IS_SAME_HPP_INCLUDED
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
// is_same<T1,T2>::value is true when T1 == T2
|
||||
//
|
||||
// Copyright 2014 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
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace core
|
||||
{
|
||||
|
||||
template< class T1, class T2 > struct is_same
|
||||
{
|
||||
BOOST_STATIC_CONSTANT( bool, value = false );
|
||||
};
|
||||
|
||||
template< class T > struct is_same< T, T >
|
||||
{
|
||||
BOOST_STATIC_CONSTANT( bool, value = true );
|
||||
};
|
||||
|
||||
} // namespace core
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // #ifndef BOOST_CORE_IS_SAME_HPP_INCLUDED
|
546
miniboost/boost/cstdint.hpp
Normal file
546
miniboost/boost/cstdint.hpp
Normal file
|
@ -0,0 +1,546 @@
|
|||
// boost cstdint.hpp header file ------------------------------------------//
|
||||
|
||||
// (C) Copyright Beman Dawes 1999.
|
||||
// (C) Copyright Jens Mauer 2001
|
||||
// (C) Copyright John Maddock 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)
|
||||
|
||||
// See http://www.boost.org/libs/integer for documentation.
|
||||
|
||||
// Revision History
|
||||
// 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.)
|
||||
// 16 Apr 01 check LONGLONG_MAX when looking for "long long" (Jens Maurer)
|
||||
// 23 Jan 01 prefer "long" over "int" for int32_t and intmax_t (Jens Maurer)
|
||||
// 12 Nov 00 Merged <boost/stdint.h> (Jens Maurer)
|
||||
// 23 Sep 00 Added INTXX_C macro support (John Maddock).
|
||||
// 22 Sep 00 Better 64-bit support (John Maddock)
|
||||
// 29 Jun 00 Reimplement to avoid including stdint.h within namespace boost
|
||||
// 8 Aug 99 Initial version (Beman Dawes)
|
||||
|
||||
|
||||
#ifndef BOOST_CSTDINT_HPP
|
||||
#define BOOST_CSTDINT_HPP
|
||||
|
||||
//
|
||||
// Since we always define the INT#_C macros as per C++0x,
|
||||
// define __STDC_CONSTANT_MACROS so that <stdint.h> does the right
|
||||
// thing if possible, and so that the user knows that the macros
|
||||
// are actually defined as per C99.
|
||||
//
|
||||
#ifndef __STDC_CONSTANT_MACROS
|
||||
# define __STDC_CONSTANT_MACROS
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
//
|
||||
// Note that GLIBC is a bit inconsistent about whether int64_t is defined or not
|
||||
// depending upon what headers happen to have been included first...
|
||||
// so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG.
|
||||
// See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990
|
||||
//
|
||||
#if defined(BOOST_HAS_STDINT_H) \
|
||||
&& (!defined(__GLIBC__) \
|
||||
|| defined(__GLIBC_HAVE_LONG_LONG) \
|
||||
|| (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17)))))
|
||||
|
||||
// The following #include is an implementation artifact; not part of interface.
|
||||
# ifdef __hpux
|
||||
// HP-UX has a vaguely nice <stdint.h> in a non-standard location
|
||||
# include <inttypes.h>
|
||||
# ifdef __STDC_32_MODE__
|
||||
// this is triggered with GCC, because it defines __cplusplus < 199707L
|
||||
# define BOOST_NO_INT64_T
|
||||
# endif
|
||||
# elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX)
|
||||
# include <inttypes.h>
|
||||
# else
|
||||
# include <stdint.h>
|
||||
|
||||
// There is a bug in Cygwin two _C macros
|
||||
# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__)
|
||||
# undef INTMAX_C
|
||||
# undef UINTMAX_C
|
||||
# define INTMAX_C(c) c##LL
|
||||
# define UINTMAX_C(c) c##ULL
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
#ifdef __QNX__
|
||||
|
||||
// QNX (Dinkumware stdlib) defines these as non-standard names.
|
||||
// Reflect to the standard names.
|
||||
|
||||
typedef ::intleast8_t int_least8_t;
|
||||
typedef ::intfast8_t int_fast8_t;
|
||||
typedef ::uintleast8_t uint_least8_t;
|
||||
typedef ::uintfast8_t uint_fast8_t;
|
||||
|
||||
typedef ::intleast16_t int_least16_t;
|
||||
typedef ::intfast16_t int_fast16_t;
|
||||
typedef ::uintleast16_t uint_least16_t;
|
||||
typedef ::uintfast16_t uint_fast16_t;
|
||||
|
||||
typedef ::intleast32_t int_least32_t;
|
||||
typedef ::intfast32_t int_fast32_t;
|
||||
typedef ::uintleast32_t uint_least32_t;
|
||||
typedef ::uintfast32_t uint_fast32_t;
|
||||
|
||||
# ifndef BOOST_NO_INT64_T
|
||||
|
||||
typedef ::intleast64_t int_least64_t;
|
||||
typedef ::intfast64_t int_fast64_t;
|
||||
typedef ::uintleast64_t uint_least64_t;
|
||||
typedef ::uintfast64_t uint_fast64_t;
|
||||
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
using ::int8_t;
|
||||
using ::int_least8_t;
|
||||
using ::int_fast8_t;
|
||||
using ::uint8_t;
|
||||
using ::uint_least8_t;
|
||||
using ::uint_fast8_t;
|
||||
|
||||
using ::int16_t;
|
||||
using ::int_least16_t;
|
||||
using ::int_fast16_t;
|
||||
using ::uint16_t;
|
||||
using ::uint_least16_t;
|
||||
using ::uint_fast16_t;
|
||||
|
||||
using ::int32_t;
|
||||
using ::int_least32_t;
|
||||
using ::int_fast32_t;
|
||||
using ::uint32_t;
|
||||
using ::uint_least32_t;
|
||||
using ::uint_fast32_t;
|
||||
|
||||
# ifndef BOOST_NO_INT64_T
|
||||
|
||||
using ::int64_t;
|
||||
using ::int_least64_t;
|
||||
using ::int_fast64_t;
|
||||
using ::uint64_t;
|
||||
using ::uint_least64_t;
|
||||
using ::uint_fast64_t;
|
||||
|
||||
# endif
|
||||
|
||||
using ::intmax_t;
|
||||
using ::uintmax_t;
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || defined(__VMS) || defined(__SOLARIS9__) || defined(__NetBSD__)
|
||||
// FreeBSD and Tru64 have an <inttypes.h> that contains much of what we need.
|
||||
# include <inttypes.h>
|
||||
|
||||
namespace boost {
|
||||
|
||||
using ::int8_t;
|
||||
typedef int8_t int_least8_t;
|
||||
typedef int8_t int_fast8_t;
|
||||
using ::uint8_t;
|
||||
typedef uint8_t uint_least8_t;
|
||||
typedef uint8_t uint_fast8_t;
|
||||
|
||||
using ::int16_t;
|
||||
typedef int16_t int_least16_t;
|
||||
typedef int16_t int_fast16_t;
|
||||
using ::uint16_t;
|
||||
typedef uint16_t uint_least16_t;
|
||||
typedef uint16_t uint_fast16_t;
|
||||
|
||||
using ::int32_t;
|
||||
typedef int32_t int_least32_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
using ::uint32_t;
|
||||
typedef uint32_t uint_least32_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
|
||||
# ifndef BOOST_NO_INT64_T
|
||||
|
||||
using ::int64_t;
|
||||
typedef int64_t int_least64_t;
|
||||
typedef int64_t int_fast64_t;
|
||||
using ::uint64_t;
|
||||
typedef uint64_t uint_least64_t;
|
||||
typedef uint64_t uint_fast64_t;
|
||||
|
||||
typedef int64_t intmax_t;
|
||||
typedef uint64_t uintmax_t;
|
||||
|
||||
# else
|
||||
|
||||
typedef int32_t intmax_t;
|
||||
typedef uint32_t uintmax_t;
|
||||
|
||||
# endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#else // BOOST_HAS_STDINT_H
|
||||
|
||||
# include <boost/limits.hpp> // implementation artifact; not part of interface
|
||||
# include <limits.h> // needed for limits macros
|
||||
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
// These are fairly safe guesses for some 16-bit, and most 32-bit and 64-bit
|
||||
// platforms. For other systems, they will have to be hand tailored.
|
||||
//
|
||||
// Because the fast types are assumed to be the same as the undecorated types,
|
||||
// it may be possible to hand tailor a more efficient implementation. Such
|
||||
// an optimization may be illusionary; on the Intel x86-family 386 on, for
|
||||
// example, byte arithmetic and load/stores are as fast as "int" sized ones.
|
||||
|
||||
// 8-bit types ------------------------------------------------------------//
|
||||
|
||||
# if UCHAR_MAX == 0xff
|
||||
typedef signed char int8_t;
|
||||
typedef signed char int_least8_t;
|
||||
typedef signed char int_fast8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned char uint_least8_t;
|
||||
typedef unsigned char uint_fast8_t;
|
||||
# else
|
||||
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
||||
# endif
|
||||
|
||||
// 16-bit types -----------------------------------------------------------//
|
||||
|
||||
# if USHRT_MAX == 0xffff
|
||||
# if defined(__crayx1)
|
||||
// The Cray X1 has a 16-bit short, however it is not recommend
|
||||
// for use in performance critical code.
|
||||
typedef short int16_t;
|
||||
typedef short int_least16_t;
|
||||
typedef int int_fast16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned short uint_least16_t;
|
||||
typedef unsigned int uint_fast16_t;
|
||||
# else
|
||||
typedef short int16_t;
|
||||
typedef short int_least16_t;
|
||||
typedef short int_fast16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned short uint_least16_t;
|
||||
typedef unsigned short uint_fast16_t;
|
||||
# endif
|
||||
# elif (USHRT_MAX == 0xffffffff) && defined(__MTA__)
|
||||
// On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified
|
||||
// MTA / XMT does support the following non-standard integer types
|
||||
typedef __short16 int16_t;
|
||||
typedef __short16 int_least16_t;
|
||||
typedef __short16 int_fast16_t;
|
||||
typedef unsigned __short16 uint16_t;
|
||||
typedef unsigned __short16 uint_least16_t;
|
||||
typedef unsigned __short16 uint_fast16_t;
|
||||
# elif (USHRT_MAX == 0xffffffff) && defined(CRAY)
|
||||
// no 16-bit types on Cray:
|
||||
typedef short int_least16_t;
|
||||
typedef short int_fast16_t;
|
||||
typedef unsigned short uint_least16_t;
|
||||
typedef unsigned short uint_fast16_t;
|
||||
# else
|
||||
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
||||
# endif
|
||||
|
||||
// 32-bit types -----------------------------------------------------------//
|
||||
|
||||
# if UINT_MAX == 0xffffffff
|
||||
typedef int int32_t;
|
||||
typedef int int_least32_t;
|
||||
typedef int int_fast32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned int uint_least32_t;
|
||||
typedef unsigned int uint_fast32_t;
|
||||
# elif (USHRT_MAX == 0xffffffff)
|
||||
typedef short int32_t;
|
||||
typedef short int_least32_t;
|
||||
typedef short int_fast32_t;
|
||||
typedef unsigned short uint32_t;
|
||||
typedef unsigned short uint_least32_t;
|
||||
typedef unsigned short uint_fast32_t;
|
||||
# elif ULONG_MAX == 0xffffffff
|
||||
typedef long int32_t;
|
||||
typedef long int_least32_t;
|
||||
typedef long int_fast32_t;
|
||||
typedef unsigned long uint32_t;
|
||||
typedef unsigned long uint_least32_t;
|
||||
typedef unsigned long uint_fast32_t;
|
||||
# elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__)
|
||||
// Integers are 64 bits on the MTA / XMT
|
||||
typedef __int32 int32_t;
|
||||
typedef __int32 int_least32_t;
|
||||
typedef __int32 int_fast32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int32 uint_least32_t;
|
||||
typedef unsigned __int32 uint_fast32_t;
|
||||
# else
|
||||
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
||||
# endif
|
||||
|
||||
// 64-bit types + intmax_t and uintmax_t ----------------------------------//
|
||||
|
||||
# if defined(BOOST_HAS_LONG_LONG) && \
|
||||
!defined(BOOST_MSVC) && !defined(__BORLANDC__) && \
|
||||
(!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \
|
||||
(defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
|
||||
# if defined(__hpux)
|
||||
// HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
|
||||
# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL)
|
||||
// 2**64 - 1
|
||||
# else
|
||||
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
||||
# endif
|
||||
|
||||
typedef ::boost::long_long_type intmax_t;
|
||||
typedef ::boost::ulong_long_type uintmax_t;
|
||||
typedef ::boost::long_long_type int64_t;
|
||||
typedef ::boost::long_long_type int_least64_t;
|
||||
typedef ::boost::long_long_type int_fast64_t;
|
||||
typedef ::boost::ulong_long_type uint64_t;
|
||||
typedef ::boost::ulong_long_type uint_least64_t;
|
||||
typedef ::boost::ulong_long_type uint_fast64_t;
|
||||
|
||||
# elif ULONG_MAX != 0xffffffff
|
||||
|
||||
# if ULONG_MAX == 18446744073709551615 // 2**64 - 1
|
||||
typedef long intmax_t;
|
||||
typedef unsigned long uintmax_t;
|
||||
typedef long int64_t;
|
||||
typedef long int_least64_t;
|
||||
typedef long int_fast64_t;
|
||||
typedef unsigned long uint64_t;
|
||||
typedef unsigned long uint_least64_t;
|
||||
typedef unsigned long uint_fast64_t;
|
||||
# else
|
||||
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
||||
# endif
|
||||
# elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG)
|
||||
__extension__ typedef long long intmax_t;
|
||||
__extension__ typedef unsigned long long uintmax_t;
|
||||
__extension__ typedef long long int64_t;
|
||||
__extension__ typedef long long int_least64_t;
|
||||
__extension__ typedef long long int_fast64_t;
|
||||
__extension__ typedef unsigned long long uint64_t;
|
||||
__extension__ typedef unsigned long long uint_least64_t;
|
||||
__extension__ typedef unsigned long long uint_fast64_t;
|
||||
# elif defined(BOOST_HAS_MS_INT64)
|
||||
//
|
||||
// we have Borland/Intel/Microsoft __int64:
|
||||
//
|
||||
typedef __int64 intmax_t;
|
||||
typedef unsigned __int64 uintmax_t;
|
||||
typedef __int64 int64_t;
|
||||
typedef __int64 int_least64_t;
|
||||
typedef __int64 int_fast64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
typedef unsigned __int64 uint_least64_t;
|
||||
typedef unsigned __int64 uint_fast64_t;
|
||||
# else // assume no 64-bit integers
|
||||
# define BOOST_NO_INT64_T
|
||||
typedef int32_t intmax_t;
|
||||
typedef uint32_t uintmax_t;
|
||||
# endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_HAS_STDINT_H
|
||||
|
||||
// intptr_t/uintptr_t are defined separately because they are optional and not universally available
|
||||
#if defined(BOOST_WINDOWS) && !defined(_WIN32_WCE) && !defined(BOOST_HAS_STDINT_H)
|
||||
// Older MSVC don't have stdint.h and have intptr_t/uintptr_t defined in stddef.h
|
||||
#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(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
|
||||
|| defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(sun)
|
||||
|
||||
namespace boost {
|
||||
using ::intptr_t;
|
||||
using ::uintptr_t;
|
||||
}
|
||||
#define BOOST_HAS_INTPTR_T
|
||||
|
||||
// Clang pretends to be GCC, so it'll match this condition
|
||||
#elif defined(__GNUC__) && defined(__INTPTR_TYPE__) && defined(__UINTPTR_TYPE__)
|
||||
|
||||
namespace boost {
|
||||
typedef __INTPTR_TYPE__ intptr_t;
|
||||
typedef __UINTPTR_TYPE__ uintptr_t;
|
||||
}
|
||||
#define BOOST_HAS_INTPTR_T
|
||||
|
||||
#endif
|
||||
|
||||
#endif // !defined(__PGIC__)
|
||||
|
||||
#endif // BOOST_CSTDINT_HPP
|
||||
|
||||
|
||||
/****************************************************
|
||||
|
||||
Macro definition section:
|
||||
|
||||
Added 23rd September 2000 (John Maddock).
|
||||
Modified 11th September 2001 to be excluded when
|
||||
BOOST_HAS_STDINT_H is defined (John Maddock).
|
||||
Modified 11th Dec 2009 to always define the
|
||||
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
|
||||
|
||||
#include <limits.h>
|
||||
# define BOOST__STDC_CONSTANT_MACROS_DEFINED
|
||||
# if defined(BOOST_HAS_MS_INT64)
|
||||
//
|
||||
// Borland/Intel/Microsoft compilers have width specific suffixes:
|
||||
//
|
||||
#ifndef INT8_C
|
||||
# define INT8_C(value) value##i8
|
||||
#endif
|
||||
#ifndef INT16_C
|
||||
# define INT16_C(value) value##i16
|
||||
#endif
|
||||
#ifndef INT32_C
|
||||
# define INT32_C(value) value##i32
|
||||
#endif
|
||||
#ifndef INT64_C
|
||||
# define INT64_C(value) value##i64
|
||||
#endif
|
||||
# ifdef __BORLANDC__
|
||||
// Borland bug: appending ui8 makes the type a signed char
|
||||
# define UINT8_C(value) static_cast<unsigned char>(value##u)
|
||||
# else
|
||||
# define UINT8_C(value) value##ui8
|
||||
# endif
|
||||
#ifndef UINT16_C
|
||||
# define UINT16_C(value) value##ui16
|
||||
#endif
|
||||
#ifndef UINT32_C
|
||||
# define UINT32_C(value) value##ui32
|
||||
#endif
|
||||
#ifndef UINT64_C
|
||||
# define UINT64_C(value) value##ui64
|
||||
#endif
|
||||
#ifndef INTMAX_C
|
||||
# define INTMAX_C(value) value##i64
|
||||
# define UINTMAX_C(value) value##ui64
|
||||
#endif
|
||||
|
||||
# else
|
||||
// do it the old fashioned way:
|
||||
|
||||
// 8-bit types ------------------------------------------------------------//
|
||||
|
||||
# if (UCHAR_MAX == 0xff) && !defined(INT8_C)
|
||||
# define INT8_C(value) static_cast<boost::int8_t>(value)
|
||||
# define UINT8_C(value) static_cast<boost::uint8_t>(value##u)
|
||||
# endif
|
||||
|
||||
// 16-bit types -----------------------------------------------------------//
|
||||
|
||||
# if (USHRT_MAX == 0xffff) && !defined(INT16_C)
|
||||
# define INT16_C(value) static_cast<boost::int16_t>(value)
|
||||
# define UINT16_C(value) static_cast<boost::uint16_t>(value##u)
|
||||
# endif
|
||||
|
||||
// 32-bit types -----------------------------------------------------------//
|
||||
#ifndef INT32_C
|
||||
# if (UINT_MAX == 0xffffffff)
|
||||
# define INT32_C(value) value
|
||||
# define UINT32_C(value) value##u
|
||||
# elif ULONG_MAX == 0xffffffff
|
||||
# define INT32_C(value) value##L
|
||||
# define UINT32_C(value) value##uL
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// 64-bit types + intmax_t and uintmax_t ----------------------------------//
|
||||
#ifndef INT64_C
|
||||
# if defined(BOOST_HAS_LONG_LONG) && \
|
||||
(defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_ULLONG_MAX) || defined(_LLONG_MAX))
|
||||
|
||||
# if defined(__hpux)
|
||||
// HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
|
||||
# define INT64_C(value) value##LL
|
||||
# define UINT64_C(value) value##uLL
|
||||
# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || \
|
||||
(defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || \
|
||||
(defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) || \
|
||||
(defined(_ULLONG_MAX) && _ULLONG_MAX == 18446744073709551615ULL) || \
|
||||
(defined(_LLONG_MAX) && _LLONG_MAX == 9223372036854775807LL)
|
||||
|
||||
# define INT64_C(value) value##LL
|
||||
# define UINT64_C(value) value##uLL
|
||||
# else
|
||||
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
||||
# endif
|
||||
# elif ULONG_MAX != 0xffffffff
|
||||
|
||||
# if ULONG_MAX == 18446744073709551615U // 2**64 - 1
|
||||
# define INT64_C(value) value##L
|
||||
# define UINT64_C(value) value##uL
|
||||
# else
|
||||
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
||||
# endif
|
||||
# elif defined(BOOST_HAS_LONG_LONG)
|
||||
// Usual macros not defined, work things out for ourselves:
|
||||
# if(~0uLL == 18446744073709551615ULL)
|
||||
# define INT64_C(value) value##LL
|
||||
# define UINT64_C(value) value##uLL
|
||||
# else
|
||||
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
||||
# endif
|
||||
# else
|
||||
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
||||
# endif
|
||||
|
||||
# ifdef BOOST_NO_INT64_T
|
||||
# define INTMAX_C(value) INT32_C(value)
|
||||
# define UINTMAX_C(value) UINT32_C(value)
|
||||
# else
|
||||
# define INTMAX_C(value) INT64_C(value)
|
||||
# define UINTMAX_C(value) UINT64_C(value)
|
||||
# endif
|
||||
#endif
|
||||
# endif // Borland/Microsoft specific width suffixes
|
||||
|
||||
#endif // INT#_C macros.
|
||||
|
||||
|
||||
|
||||
|
|
@ -16,7 +16,6 @@
|
|||
# include <boost/type_traits/remove_reference.hpp>
|
||||
# include <boost/type_traits/remove_pointer.hpp>
|
||||
|
||||
# include <boost/type_traits/detail/ice_and.hpp>
|
||||
# include <boost/detail/workaround.hpp>
|
||||
|
||||
# include <boost/mpl/eval_if.hpp>
|
||||
|
|
|
@ -398,10 +398,16 @@ struct foreach_reference
|
|||
// encode_type
|
||||
//
|
||||
template<typename T>
|
||||
inline type2type<T> *encode_type(T &, boost::mpl::false_ *) { return 0; }
|
||||
inline type2type<T> *encode_type(T &, boost::false_type*) { return 0; }
|
||||
|
||||
template<typename T>
|
||||
inline type2type<T, const_> *encode_type(T const &, boost::mpl::true_ *) { return 0; }
|
||||
inline type2type<T, const_> *encode_type(T const &, boost::true_type*) { return 0; }
|
||||
|
||||
template<typename T>
|
||||
inline type2type<T> *encode_type(T &, boost::mpl::false_*) { return 0; }
|
||||
|
||||
template<typename T>
|
||||
inline type2type<T, const_> *encode_type(T const &, boost::mpl::true_*) { return 0; }
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// set_false
|
||||
|
|
|
@ -1,372 +1,331 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2011-2014. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/intrusive for documentation.
|
||||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// sample.h
|
||||
#ifndef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_CALLABLE_WITH_HPP
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_CALLABLE_WITH_HPP
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
//Mark that we don't support 0 arg calls due to compiler ICE in GCC 3.4/4.0/4.1 and
|
||||
//wrong SFINAE for GCC 4.2/4.3
|
||||
#if defined(__GNUC__) && !defined(__clang__) && ((__GNUC__*100 + __GNUC_MINOR__*10) >= 340) && ((__GNUC__*100 + __GNUC_MINOR__*10) <= 430)
|
||||
#define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
|
||||
#elif defined(BOOST_INTEL) && (BOOST_INTEL < 1200 )
|
||||
#define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
|
||||
#endif
|
||||
#include <cstddef>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/move/detail/fwd_macros.hpp>
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_DETAILS_INCLUDED
|
||||
#define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_DETAILS_INCLUDED
|
||||
namespace boost_intrusive_hmfcw {
|
||||
|
||||
#include <boost/intrusive/detail/preprocessor.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
typedef char yes_type;
|
||||
struct no_type{ char dummy[2]; };
|
||||
|
||||
#if defined(BOOST_NO_CXX11_DECLTYPE)
|
||||
|
||||
//Mark that we don't support 0 arg calls due to compiler ICE in GCC 3.4/4.0/4.1 and
|
||||
//wrong SFINAE for GCC 4.2/4.3
|
||||
#if defined(__GNUC__) && !defined(__clang__) && ((__GNUC__*100 + __GNUC_MINOR__*10) >= 340) && ((__GNUC__*100 + __GNUC_MINOR__*10) <= 430)
|
||||
#define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
|
||||
#elif defined(BOOST_INTEL) && (BOOST_INTEL < 1200 )
|
||||
#define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
|
||||
#endif
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
namespace boost_intrusive_has_member_function_callable_with {
|
||||
template<class T>
|
||||
struct make_dontcare
|
||||
{
|
||||
typedef dont_care type;
|
||||
};
|
||||
|
||||
struct dont_care
|
||||
{
|
||||
dont_care(...);
|
||||
};
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
struct make_dontcare
|
||||
{
|
||||
typedef boost_intrusive_has_member_function_callable_with::dont_care type;
|
||||
};
|
||||
struct dont_care
|
||||
{
|
||||
dont_care(...);
|
||||
};
|
||||
|
||||
struct private_type
|
||||
{
|
||||
static private_type p;
|
||||
private_type const &operator,(int) const;
|
||||
};
|
||||
struct private_type
|
||||
{
|
||||
static private_type p;
|
||||
private_type const &operator,(int) const;
|
||||
};
|
||||
|
||||
typedef char yes_type; // sizeof(yes_type) == 1
|
||||
struct no_type{ char dummy[2]; }; // sizeof(no_type) == 2
|
||||
template<typename T>
|
||||
no_type is_private_type(T const &);
|
||||
yes_type is_private_type(private_type const &);
|
||||
|
||||
template<typename T>
|
||||
no_type is_private_type(T const &);
|
||||
yes_type is_private_type(private_type const &);
|
||||
#endif //#if defined(BOOST_NO_CXX11_DECLTYPE)
|
||||
|
||||
} //boost_intrusive_has_member_function_callable_with
|
||||
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template<typename T> struct remove_cv { typedef T type; };
|
||||
template<typename T> struct remove_cv<const T> { typedef T type; };
|
||||
template<typename T> struct remove_cv<const volatile T> { typedef T type; };
|
||||
template<typename T> struct remove_cv<volatile T> { typedef T type; };
|
||||
|
||||
#endif
|
||||
|
||||
} //namespace boost_intrusive_hmfcw {
|
||||
|
||||
#endif //BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_CALLABLE_WITH_HPP
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME
|
||||
#error "You MUST define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME before including this header!"
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN
|
||||
#error "You MUST define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN before including this header!"
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX
|
||||
#error "You MUST define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX before including this header!"
|
||||
#endif
|
||||
|
||||
#if BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX < BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN
|
||||
#error "BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX value MUST be greater or equal than BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN!"
|
||||
#endif
|
||||
|
||||
#if BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX == 0
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_COMMA_IF
|
||||
#else
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_COMMA_IF ,
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG
|
||||
#error "BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG not defined!"
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
|
||||
#error "BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END not defined!"
|
||||
#endif
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE)
|
||||
//With decltype and variadic templaes, things are pretty easy
|
||||
template<typename Fun, class ...Args>
|
||||
struct BOOST_MOVE_CAT(has_member_function_callable_with_,BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
{
|
||||
template<class U>
|
||||
static decltype(boost::move_detail::declval<U>().
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(::boost::move_detail::declval<Args>()...)
|
||||
, boost_intrusive_hmfcw::yes_type()) Test(U* f);
|
||||
template<class U>
|
||||
static boost_intrusive_hmfcw::no_type Test(...);
|
||||
static const bool value = sizeof(Test<Fun>((Fun*)0)) == sizeof(boost_intrusive_hmfcw::yes_type);
|
||||
};
|
||||
|
||||
#else //defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_NO_CXX11_DECLTYPE)
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////
|
||||
//
|
||||
// has_member_function_callable_with_impl_XXX
|
||||
// declaration, special case and 0 arg specializaton
|
||||
//
|
||||
/////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_SINGLE_ITERATION
|
||||
#endif
|
||||
/////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////
|
||||
//
|
||||
// has_member_function_callable_with_impl_XXX for 1 to N arguments
|
||||
//
|
||||
/////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
#endif //BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_DETAILS_INCLUDED
|
||||
//defined(BOOST_NO_CXX11_DECLTYPE) must be true
|
||||
template<class Fun, class ...DontCares>
|
||||
struct FunWrapTmpl : Fun
|
||||
{
|
||||
using Fun::BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME;
|
||||
boost_intrusive_hmfcw::private_type BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(DontCares...) const;
|
||||
};
|
||||
|
||||
#else //!BOOST_PP_IS_ITERATING
|
||||
template<typename Fun, class ...Args>
|
||||
struct BOOST_MOVE_CAT(has_member_function_callable_with_,BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun, Args...>
|
||||
{
|
||||
typedef FunWrapTmpl<typename boost_intrusive_hmfcw::make_dontcare<Args>::type...> FunWrap;
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME
|
||||
#error "BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME not defined!"
|
||||
#endif
|
||||
static bool const value = (sizeof(boost_intrusive_hmfcw::no_type) ==
|
||||
sizeof(boost_intrusive_hmfcw::is_private_type
|
||||
( (::boost::move_detail::declval< FunWrap<Fun> >().
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(::boost::move_detail::declval<Args>()...), 0) )
|
||||
)
|
||||
);
|
||||
};
|
||||
#else //defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN
|
||||
#error "BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN not defined!"
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
|
||||
#error "BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END not defined!"
|
||||
#endif
|
||||
|
||||
#if BOOST_PP_ITERATION_START() > BOOST_PP_ITERATION_FINISH()
|
||||
#error "BOOST_PP_ITERATION_START() must be <= BOOST_PP_ITERATION_FINISH()"
|
||||
#endif
|
||||
|
||||
#if BOOST_PP_ITERATION() == BOOST_PP_ITERATION_START()
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN
|
||||
//Preprocessor must be used to generate specializations instead of variadic templates
|
||||
|
||||
template <typename Type>
|
||||
class BOOST_PP_CAT(has_member_function_named_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
class BOOST_MOVE_CAT(has_member_function_named_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
{
|
||||
struct BaseMixin
|
||||
{
|
||||
void BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME();
|
||||
};
|
||||
|
||||
struct Base : public ::boost::intrusive::detail::remove_cv<Type>::type, public BaseMixin { Base(); };
|
||||
struct Base : public boost_intrusive_hmfcw::remove_cv<Type>::type, public BaseMixin {};
|
||||
template <typename T, T t> class Helper{};
|
||||
|
||||
template <typename U>
|
||||
static boost_intrusive_has_member_function_callable_with::no_type deduce
|
||||
static boost_intrusive_hmfcw::no_type deduce
|
||||
(U*, Helper<void (BaseMixin::*)(), &U::BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME>* = 0);
|
||||
static boost_intrusive_has_member_function_callable_with::yes_type deduce(...);
|
||||
static boost_intrusive_hmfcw::yes_type deduce(...);
|
||||
|
||||
public:
|
||||
static const bool value =
|
||||
sizeof(boost_intrusive_has_member_function_callable_with::yes_type) == sizeof(deduce((Base*)(0)));
|
||||
static const bool value = sizeof(boost_intrusive_hmfcw::yes_type) == sizeof(deduce((Base*)0));
|
||||
};
|
||||
|
||||
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
/////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////
|
||||
//
|
||||
// has_member_function_callable_with_impl_XXX specializations
|
||||
//
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
template<typename Fun, bool HasFunc
|
||||
BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION_FINISH(), BOOST_INTRUSIVE_PP_TEMPLATE_PARAM_VOID_DEFAULT, _)>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME), _impl);
|
||||
//!
|
||||
template<typename Fun, bool HasFunc BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_COMMA_IF BOOST_MOVE_CAT(BOOST_MOVE_CLASSDFLT,BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX)>
|
||||
struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME);
|
||||
|
||||
template<typename Fun BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION_FINISH(), class P)>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME), _impl)
|
||||
<Fun, false BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION_FINISH(), P)>
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
//!
|
||||
//No BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME member specialization
|
||||
template<typename Fun BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_COMMA_IF BOOST_MOVE_CAT(BOOST_MOVE_CLASS,BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX)>
|
||||
struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
<Fun, false BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_COMMA_IF BOOST_MOVE_CAT(BOOST_MOVE_TARG,BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX)>
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
#else //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template<typename Fun, bool HasFunc, class ...Args>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl);
|
||||
|
||||
template<typename Fun, class ...Args>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
<Fun, false, Args...>
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
#ifdef BOOST_NO_CXX11_DECLTYPE
|
||||
|
||||
//Special case for 0 args
|
||||
template< class F
|
||||
, std::size_t N =
|
||||
sizeof((boost::move_detail::declval<F>().
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME (), 0))>
|
||||
struct BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
{
|
||||
boost_intrusive_has_member_function_callable_with::yes_type dummy;
|
||||
BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
|
||||
};
|
||||
|
||||
//For buggy compilers like MSVC 7.1+ ((F*)0)->func() does not
|
||||
//SFINAE-out the zeroarg_checker_ instantiation but sizeof yields to 0.
|
||||
template<class F>
|
||||
struct BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<F, 0>
|
||||
{
|
||||
boost_intrusive_has_member_function_callable_with::no_type dummy;
|
||||
BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
|
||||
};
|
||||
|
||||
#endif //#ifdef BOOST_NO_CXX11_DECLTYPE
|
||||
|
||||
template<typename Fun>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
<Fun, true>
|
||||
{
|
||||
#ifndef BOOST_NO_CXX11_DECLTYPE
|
||||
template<class U, class V = decltype(boost::move_detail::declval<U>().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME()) >
|
||||
static boost_intrusive_has_member_function_callable_with::yes_type Test(U*);
|
||||
#else
|
||||
template<class U>
|
||||
static BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
<U> Test(BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>*);
|
||||
#endif
|
||||
|
||||
template <class U>
|
||||
static boost_intrusive_has_member_function_callable_with::no_type Test(...);
|
||||
|
||||
static const bool value = sizeof(Test< Fun >(0))
|
||||
== sizeof(boost_intrusive_has_member_function_callable_with::yes_type);
|
||||
};
|
||||
|
||||
template<typename Fun, class ...Args>
|
||||
struct BOOST_PP_CAT( BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME), _impl)
|
||||
<Fun, true , Args...>
|
||||
{
|
||||
|
||||
template<class ...DontCares>
|
||||
struct FunWrapTmpl : Fun
|
||||
{
|
||||
FunWrapTmpl();
|
||||
using Fun::BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME;
|
||||
|
||||
boost_intrusive_has_member_function_callable_with::private_type
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME
|
||||
( DontCares...) const;
|
||||
};
|
||||
|
||||
typedef FunWrapTmpl<typename boost_intrusive_has_member_function_callable_with::make_dontcare<Args>::type...> FunWrap;
|
||||
|
||||
static bool const value = (sizeof(boost_intrusive_has_member_function_callable_with::no_type) ==
|
||||
sizeof(boost_intrusive_has_member_function_callable_with::is_private_type
|
||||
( (::boost::move_detail::declval< FunWrap >().
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME
|
||||
( ::boost::move_detail::declval<Args>()... ), 0) )
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
template<typename Fun, class ...Args>
|
||||
struct BOOST_PP_CAT( has_member_function_callable_with_
|
||||
, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
: public BOOST_PP_CAT( BOOST_PP_CAT(has_member_function_callable_with_
|
||||
, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
< Fun
|
||||
, BOOST_PP_CAT( has_member_function_named_
|
||||
, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME )<Fun>::value
|
||||
, Args... >
|
||||
{};
|
||||
|
||||
#endif //defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
|
||||
|
||||
#endif //BOOST_PP_ITERATION() == BOOST_PP_ITERATION_START()
|
||||
|
||||
#if BOOST_PP_ITERATION() == 0
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN
|
||||
|
||||
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
#if !defined(_MSC_VER) || (_MSC_VER < 1600)
|
||||
|
||||
#if defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
|
||||
#if BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN == 0
|
||||
//0 arg specialization when BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME is present
|
||||
#if !defined(BOOST_NO_CXX11_DECLTYPE)
|
||||
|
||||
template<typename Fun>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
<Fun, true BOOST_PP_ENUM_TRAILING(BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION()), BOOST_INTRUSIVE_PP_IDENTITY, void)>
|
||||
struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun, true>
|
||||
{
|
||||
//Mark that we don't support 0 arg calls due to compiler ICE in GCC 3.4/4.0/4.1 and
|
||||
//wrong SFINAE for GCC 4.2/4.3
|
||||
static const bool value = true;
|
||||
template<class U>
|
||||
static decltype(boost::move_detail::declval<U>().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME()
|
||||
, boost_intrusive_hmfcw::yes_type()) Test(U* f);
|
||||
|
||||
template<class U>
|
||||
static boost_intrusive_hmfcw::no_type Test(...);
|
||||
static const bool value = sizeof(Test<Fun>((Fun*)0)) == sizeof(boost_intrusive_hmfcw::yes_type);
|
||||
};
|
||||
|
||||
#else //defined(BOOST_NO_CXX11_DECLTYPE)
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
|
||||
|
||||
template<class F, std::size_t N = sizeof(boost::move_detail::declval<F>().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(), 0)>
|
||||
struct BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
{ boost_intrusive_hmfcw::yes_type dummy[N ? 1 : 2]; };
|
||||
|
||||
template<typename Fun>
|
||||
struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun, true>
|
||||
{
|
||||
template<class U> static BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>
|
||||
Test(BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>*);
|
||||
template<class U> static boost_intrusive_hmfcw::no_type Test(...);
|
||||
static const bool value = sizeof(Test< Fun >(0)) == sizeof(boost_intrusive_hmfcw::yes_type);
|
||||
};
|
||||
|
||||
#else //defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
|
||||
|
||||
//Special case for 0 args
|
||||
template< class F
|
||||
, std::size_t N =
|
||||
sizeof((boost::move_detail::declval<F>().
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME (), 0))>
|
||||
struct BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
{
|
||||
boost_intrusive_has_member_function_callable_with::yes_type dummy;
|
||||
BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
|
||||
};
|
||||
template<typename Fun>
|
||||
struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun, true>
|
||||
{//GCC [3.4-4.3) gives ICE when instantiating the 0 arg version so it is not supported.
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
//For buggy compilers like MSVC 7.1+ ((F*)0)->func() does not
|
||||
//SFINAE-out the zeroarg_checker_ instantiation but sizeof yields to 0.
|
||||
template<class F>
|
||||
struct BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<F, 0>
|
||||
{
|
||||
boost_intrusive_has_member_function_callable_with::no_type dummy;
|
||||
BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)(int);
|
||||
};
|
||||
#endif//!defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
|
||||
#endif //!defined(BOOST_NO_CXX11_DECLTYPE)
|
||||
#endif //#if BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN == 0
|
||||
|
||||
template<typename Fun>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
<Fun, true BOOST_PP_ENUM_TRAILING(BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION()), BOOST_INTRUSIVE_PP_IDENTITY, void)>
|
||||
{
|
||||
template<class U>
|
||||
static BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>
|
||||
Test(BOOST_PP_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>*);
|
||||
#if BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX > 0
|
||||
//1 to N arg specialization when BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME is present
|
||||
#if defined(BOOST_NO_CXX11_DECLTYPE)
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_ITERATION(N)\
|
||||
template<class Fun> struct BOOST_MOVE_CAT(FunWrap##N, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) : Fun\
|
||||
{\
|
||||
using Fun::BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME;\
|
||||
boost_intrusive_hmfcw::private_type BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME\
|
||||
(BOOST_MOVE_REPEAT##N(boost_intrusive_hmfcw::dont_care)) const;\
|
||||
};\
|
||||
\
|
||||
template<typename Fun, BOOST_MOVE_CLASS##N>\
|
||||
struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun, true, BOOST_MOVE_TARG##N>\
|
||||
{\
|
||||
static bool const value = (sizeof(boost_intrusive_hmfcw::no_type) == sizeof(boost_intrusive_hmfcw::is_private_type\
|
||||
( (::boost::move_detail::declval\
|
||||
< BOOST_MOVE_CAT(FunWrap##N, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun> >().\
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(BOOST_MOVE_DECLVAL##N), 0) )\
|
||||
)\
|
||||
);\
|
||||
};\
|
||||
//
|
||||
#else
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_ITERATION(N)\
|
||||
template<typename Fun, BOOST_MOVE_CLASS##N>\
|
||||
struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)\
|
||||
<Fun, true, BOOST_MOVE_TARG##N>\
|
||||
{\
|
||||
template<class U>\
|
||||
static decltype(boost::move_detail::declval<U>().\
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(BOOST_MOVE_DECLVAL##N)\
|
||||
, boost_intrusive_hmfcw::yes_type()) Test(U* f);\
|
||||
template<class U>\
|
||||
static boost_intrusive_hmfcw::no_type Test(...);\
|
||||
static const bool value = sizeof(Test<Fun>((Fun*)0)) == sizeof(boost_intrusive_hmfcw::yes_type);\
|
||||
};\
|
||||
//
|
||||
#endif
|
||||
////////////////////////////////////
|
||||
// Build and invoke BOOST_MOVE_ITERATE_NTOM macrofunction, note that N has to be at least 1
|
||||
////////////////////////////////////
|
||||
#if BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN == 0
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_ITERATE_MIN 1
|
||||
#else
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_ITERATE_MIN BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN
|
||||
#endif
|
||||
BOOST_MOVE_CAT
|
||||
(BOOST_MOVE_CAT(BOOST_MOVE_CAT(BOOST_MOVE_ITERATE_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_ITERATE_MIN), TO)
|
||||
,BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX)
|
||||
(BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_ITERATION)
|
||||
#undef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_ITERATION
|
||||
#undef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_ITERATE_MIN
|
||||
////////////////////////////////////
|
||||
// End of BOOST_MOVE_ITERATE_NTOM
|
||||
////////////////////////////////////
|
||||
#endif //BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX > 0
|
||||
|
||||
template <class U>
|
||||
static boost_intrusive_has_member_function_callable_with::no_type Test(...);
|
||||
/////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////
|
||||
//
|
||||
// has_member_function_callable_with_FUNC
|
||||
//
|
||||
/////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
static const bool value = sizeof(Test< Fun >(0))
|
||||
== sizeof(boost_intrusive_has_member_function_callable_with::yes_type);
|
||||
};
|
||||
#endif //defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
|
||||
//Otherwise use the preprocessor
|
||||
template<typename Fun BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_COMMA_IF BOOST_MOVE_CAT(BOOST_MOVE_CLASSDFLT,BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX)>
|
||||
struct BOOST_MOVE_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
: public BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
<Fun
|
||||
, BOOST_MOVE_CAT(has_member_function_named_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun>::value
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_COMMA_IF BOOST_MOVE_CAT(BOOST_MOVE_TARG,BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX)>
|
||||
{};
|
||||
#endif //defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
#endif
|
||||
|
||||
#else //#if !defined(_MSC_VER) || (_MSC_VER < 1600)
|
||||
template<typename Fun>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
<Fun, true BOOST_PP_ENUM_TRAILING(BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION()), BOOST_INTRUSIVE_PP_IDENTITY, void)>
|
||||
{
|
||||
template<class U>
|
||||
static decltype( boost::move_detail::declval<U>().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME()
|
||||
, boost_intrusive_has_member_function_callable_with::yes_type())
|
||||
Test(U*);
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
|
||||
|
||||
template<class U>
|
||||
static boost_intrusive_has_member_function_callable_with::no_type Test(...);
|
||||
//Undef local macros
|
||||
#undef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_COMMA_IF
|
||||
|
||||
static const bool value = sizeof(Test<Fun>(0))
|
||||
== sizeof(boost_intrusive_has_member_function_callable_with::yes_type);
|
||||
};
|
||||
#endif //#if !defined(_MSC_VER) || (_MSC_VER < 1600)
|
||||
|
||||
#else //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
#endif //#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
|
||||
|
||||
#else //BOOST_PP_ITERATION() == 0
|
||||
|
||||
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN
|
||||
|
||||
template<typename Fun BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), class P)>
|
||||
struct BOOST_PP_CAT( BOOST_PP_CAT(has_member_function_callable_with_
|
||||
, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
|
||||
<Fun, true
|
||||
BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), P)
|
||||
BOOST_PP_ENUM_TRAILING( BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION())
|
||||
, BOOST_INTRUSIVE_PP_IDENTITY
|
||||
, void)>
|
||||
{
|
||||
struct FunWrap : Fun
|
||||
{
|
||||
FunWrap();
|
||||
|
||||
using Fun::BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME;
|
||||
boost_intrusive_has_member_function_callable_with::private_type
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME
|
||||
( BOOST_PP_ENUM(BOOST_PP_ITERATION()
|
||||
, BOOST_INTRUSIVE_PP_IDENTITY
|
||||
, boost_intrusive_has_member_function_callable_with::dont_care)) const;
|
||||
};
|
||||
|
||||
static bool const value =
|
||||
(sizeof(boost_intrusive_has_member_function_callable_with::no_type) ==
|
||||
sizeof(boost_intrusive_has_member_function_callable_with::is_private_type
|
||||
( (boost::move_detail::declval<FunWrap>().
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME
|
||||
( BOOST_PP_ENUM( BOOST_PP_ITERATION(), BOOST_INTRUSIVE_PP_DECLVAL, _) ), 0
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
|
||||
#endif //#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
#endif //BOOST_PP_ITERATION() == 0
|
||||
|
||||
#if BOOST_PP_ITERATION() == BOOST_PP_ITERATION_FINISH()
|
||||
|
||||
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN
|
||||
|
||||
template<typename Fun
|
||||
BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION_FINISH(), BOOST_INTRUSIVE_PP_TEMPLATE_PARAM_VOID_DEFAULT, _)>
|
||||
struct BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
|
||||
: public BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME), _impl)
|
||||
<Fun, BOOST_PP_CAT(has_member_function_named_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun>::value
|
||||
BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION_FINISH(), P) >
|
||||
{};
|
||||
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
|
||||
|
||||
#endif //#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
#undef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME
|
||||
#undef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN
|
||||
#undef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
|
||||
|
||||
#endif //#if BOOST_PP_ITERATION() == BOOST_PP_ITERATION_FINISH()
|
||||
|
||||
#endif //!BOOST_PP_IS_ITERATING
|
||||
//Undef user defined macros
|
||||
#undef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME
|
||||
#undef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN
|
||||
#undef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX
|
||||
#undef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG
|
||||
#undef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END
|
||||
|
|
|
@ -1,92 +0,0 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Pablo Halpern 2009. 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)
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2011-2014. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/intrusive for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_ALLOCATOR_MEMORY_UTIL_HPP
|
||||
#define BOOST_INTRUSIVE_ALLOCATOR_MEMORY_UTIL_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/intrusive/detail/preprocessor.hpp>
|
||||
#include <boost/preprocessor/iteration/iterate.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail {
|
||||
|
||||
template <typename T>
|
||||
inline T* addressof(T& obj)
|
||||
{
|
||||
return static_cast<T*>
|
||||
(static_cast<void*>
|
||||
(const_cast<char*>
|
||||
(&reinterpret_cast<const char&>(obj))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
struct LowPriorityConversion
|
||||
{
|
||||
// Convertible from T with user-defined-conversion rank.
|
||||
LowPriorityConversion(const T&) { }
|
||||
};
|
||||
|
||||
}}} //namespace boost::intrusive::detail
|
||||
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME pointer_to
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME static_cast_from
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME const_cast_from
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME dynamic_cast_from
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 1, <boost/intrusive/detail/has_member_function_callable_with.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail {
|
||||
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(element_type)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(value_traits_ptr)
|
||||
|
||||
} //namespace detail {
|
||||
} //namespace intrusive {
|
||||
} //namespace boost {
|
||||
|
||||
#endif // ! defined(BOOST_INTRUSIVE_ALLOCATOR_MEMORY_UTIL_HPP)
|
|
@ -14,7 +14,11 @@
|
|||
#ifndef BOOST_INTRUSIVE_DETAIL_MPL_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_MPL_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
|
@ -315,7 +319,14 @@ template <> struct unvoid_ref<const void> { struct type_impl { }; typedef type_i
|
|||
::boost::intrusive::detail::if_c \
|
||||
<value, T, DefaultWrap>::type::TNAME type; \
|
||||
}; \
|
||||
\
|
||||
//
|
||||
|
||||
#define BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(INSTANTIATION_NS_PREFIX, T, TNAME, TIMPL) \
|
||||
typename INSTANTIATION_NS_PREFIX \
|
||||
boost_intrusive_default_type_ ## TNAME< T, TIMPL >::type \
|
||||
//
|
||||
|
||||
#define BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(TNAME)\
|
||||
template <typename T, typename DefaultType> \
|
||||
struct boost_intrusive_eval_default_type_ ## TNAME \
|
||||
{ \
|
||||
|
@ -339,11 +350,6 @@ template <> struct unvoid_ref<const void> { struct type_impl { }; typedef type_i
|
|||
}; \
|
||||
//
|
||||
|
||||
#define BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(INSTANTIATION_NS_PREFIX, T, TNAME, TIMPL) \
|
||||
typename INSTANTIATION_NS_PREFIX \
|
||||
boost_intrusive_default_type_ ## TNAME< T, TIMPL >::type \
|
||||
//
|
||||
|
||||
#define BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(INSTANTIATION_NS_PREFIX, T, TNAME, TIMPL) \
|
||||
typename INSTANTIATION_NS_PREFIX \
|
||||
boost_intrusive_eval_default_type_ ## TNAME< T, TIMPL >::type \
|
||||
|
@ -367,6 +373,58 @@ struct TRAITS_PREFIX##_bool_is_true\
|
|||
};\
|
||||
//
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(TRAITS_NAME, FUNC_NAME) \
|
||||
template <typename U, typename Signature> \
|
||||
class TRAITS_NAME \
|
||||
{ \
|
||||
private: \
|
||||
template<Signature> struct helper;\
|
||||
template<typename T> \
|
||||
static ::boost::intrusive::detail::yes_type check(helper<&T::FUNC_NAME>*); \
|
||||
template<typename T> static ::boost::intrusive::detail::no_type check(...); \
|
||||
public: \
|
||||
static const bool value = sizeof(check<U>(0)) == sizeof(::boost::intrusive::detail::yes_type); \
|
||||
}; \
|
||||
//
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED(TRAITS_NAME, FUNC_NAME) \
|
||||
template <typename Type> \
|
||||
struct TRAITS_NAME \
|
||||
{ \
|
||||
struct BaseMixin \
|
||||
{ \
|
||||
void FUNC_NAME(); \
|
||||
}; \
|
||||
struct Base : public Type, public BaseMixin { Base(); }; \
|
||||
template <typename T, T t> class Helper{}; \
|
||||
template <typename U> \
|
||||
static ::boost::intrusive::detail::no_type check(U*, Helper<void (BaseMixin::*)(), &U::FUNC_NAME>* = 0); \
|
||||
static ::boost::intrusive::detail::yes_type check(...); \
|
||||
static const bool value = sizeof(::boost::intrusive::detail::yes_type) == sizeof(check((Base*)(0))); \
|
||||
};\
|
||||
//
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(TRAITS_NAME, FUNC_NAME) \
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED(TRAITS_NAME##_ignore_signature, FUNC_NAME) \
|
||||
\
|
||||
template <typename Type, class> \
|
||||
struct TRAITS_NAME \
|
||||
: public TRAITS_NAME##_ignore_signature<Type> \
|
||||
{};\
|
||||
//
|
||||
|
||||
|
||||
template <typename T>
|
||||
inline T* addressof(T& obj)
|
||||
{
|
||||
return static_cast<T*>
|
||||
(static_cast<void*>
|
||||
(const_cast<char*>
|
||||
(&reinterpret_cast<const char&>(obj))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
} //namespace detail
|
||||
} //namespace intrusive
|
||||
} //namespace boost
|
||||
|
|
|
@ -11,11 +11,17 @@
|
|||
#ifndef BOOST_INTRUSIVE_DETAIL_POINTER_ELEMENT_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_POINTER_ELEMENT_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#endif //BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
|
@ -118,14 +124,6 @@ template <typename T> struct first_param
|
|||
< TemplateClass<T, P0, P1, P2, P3, P4, P5, P6, P7, P8> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //10arg
|
||||
<class,class,class,class,class,class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> >
|
||||
{ typedef T type; };
|
||||
|
||||
#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template <typename T>
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2008-2014. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/intrusive for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_PREPROCESSOR_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_PREPROCESSOR_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/repetition/enum.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_trailing.hpp>
|
||||
#include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
|
||||
|
||||
#define BOOST_INTRUSIVE_MAX_CONSTRUCTOR_PARAMETERS 10
|
||||
|
||||
#define BOOST_INTRUSIVE_PP_IDENTITY(z, n, data) data
|
||||
|
||||
#define BOOST_INTRUSIVE_PP_DECLVAL(z, n, data) \
|
||||
boost::move_detail::declval< BOOST_PP_CAT(P, n) >() \
|
||||
//!
|
||||
|
||||
#define BOOST_INTRUSIVE_PP_TEMPLATE_PARAM_VOID_DEFAULT(z, n, data) \
|
||||
BOOST_PP_CAT(class P, n) = void \
|
||||
//!
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif //#ifndef BOOST_INTRUSIVE_DETAIL_PREPROCESSOR_HPP
|
|
@ -8,10 +8,14 @@
|
|||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_WRKRND_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_WRKRND_HPP
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
|
@ -26,5 +30,9 @@
|
|||
//Macros for documentation purposes. For code, expands to the argument
|
||||
#define BOOST_INTRUSIVE_IMPDEF(TYPE) TYPE
|
||||
#define BOOST_INTRUSIVE_SEEDOC(TYPE) TYPE
|
||||
#define BOOST_INTRUSIVE_DOC1ST(TYPE1, TYPE2) TYPE2
|
||||
#define BOOST_INTRUSIVE_I ,
|
||||
#define BOOST_INTRUSIVE_DOCIGN(T1) T1
|
||||
|
||||
#endif //#ifndef BOOST_INTRUSIVE_DETAIL_WRKRND_HPP
|
||||
|
||||
#endif //#ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
|
||||
|
|
|
@ -1,729 +0,0 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2013
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/intrusive for documentation.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_FWD_HPP
|
||||
#define BOOST_INTRUSIVE_FWD_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
//! \file
|
||||
//! This header file forward declares most Intrusive classes.
|
||||
//!
|
||||
//! It forward declares the following containers and hooks:
|
||||
//! - boost::intrusive::slist / boost::intrusive::slist_base_hook / boost::intrusive::slist_member_hook
|
||||
//! - boost::intrusive::list / boost::intrusive::list_base_hook / boost::intrusive::list_member_hook
|
||||
//! - boost::intrusive::bstree / boost::intrusive::bs_set / boost::intrusive::bs_multiset /
|
||||
//! boost::intrusive::bs_set_base_hook / boost::intrusive::bs_set_member_hook
|
||||
//! - boost::intrusive::rbtree / boost::intrusive::set / boost::intrusive::multiset /
|
||||
//! boost::intrusive::set_base_hook / boost::intrusive::set_member_hook
|
||||
//! - boost::intrusive::avltree / boost::intrusive::avl_set / boost::intrusive::avl_multiset /
|
||||
//! boost::intrusive::avl_set_base_hook / boost::intrusive::avl_set_member_hook
|
||||
//! - boost::intrusive::splaytree / boost::intrusive::splay_set / boost::intrusive::splay_multiset
|
||||
//! - boost::intrusive::sgtree / boost::intrusive::sg_set / boost::intrusive::sg_multiset
|
||||
//! - boost::intrusive::treap / boost::intrusive::treap_set / boost::intrusive::treap_multiset
|
||||
//! - boost::intrusive::hashtable / boost::intrusive::unordered_set / boost::intrusive::unordered_multiset /
|
||||
//! boost::intrusive::unordered_set_base_hook / boost::intrusive::unordered_set_member_hook /
|
||||
//! - boost::intrusive::any_base_hook / boost::intrusive::any_member_hook
|
||||
//!
|
||||
//! It forward declares the following container or hook options:
|
||||
//! - boost::intrusive::constant_time_size / boost::intrusive::size_type / boost::intrusive::compare / boost::intrusive::equal
|
||||
//! - boost::intrusive::floating_point / boost::intrusive::priority / boost::intrusive::hash
|
||||
//! - boost::intrusive::value_traits / boost::intrusive::member_hook / boost::intrusive::function_hook / boost::intrusive::base_hook
|
||||
//! - boost::intrusive::void_pointer / boost::intrusive::tag / boost::intrusive::link_mode
|
||||
//! - boost::intrusive::optimize_size / boost::intrusive::linear / boost::intrusive::cache_last
|
||||
//! - boost::intrusive::bucket_traits / boost::intrusive::store_hash / boost::intrusive::optimize_multikey
|
||||
//! - boost::intrusive::power_2_buckets / boost::intrusive::cache_begin / boost::intrusive::compare_hash / boost::intrusive::incremental
|
||||
//!
|
||||
//! It forward declares the following value traits utilities:
|
||||
//! - boost::intrusive::value_traits / boost::intrusive::derivation_value_traits /
|
||||
//! boost::intrusive::trivial_value_traits
|
||||
//!
|
||||
//! Finally it forward declares the following general purpose utilities:
|
||||
//! - boost::intrusive::pointer_plus_bits / boost::intrusive::priority_compare.
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/intrusive/link_mode.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
|
||||
////////////////////////////
|
||||
// Node algorithms
|
||||
////////////////////////////
|
||||
|
||||
//Algorithms predeclarations
|
||||
template<class NodeTraits>
|
||||
class circular_list_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class circular_slist_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class linear_slist_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class bstree_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class rbtree_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class avltree_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class sgtree_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class splaytree_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class treap_algorithms;
|
||||
|
||||
////////////////////////////
|
||||
// Containers
|
||||
////////////////////////////
|
||||
|
||||
//slist
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
, class O6 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class slist;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class slist_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class slist_member_hook;
|
||||
|
||||
//list
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class list;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class list_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class list_member_hook;
|
||||
|
||||
//rbtree/set/multiset
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class rbtree;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class set;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class multiset;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class set_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class set_member_hook;
|
||||
|
||||
//splaytree/splay_set/splay_multiset
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class splaytree;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class splay_set;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class splay_multiset;
|
||||
|
||||
//avltree/avl_set/avl_multiset
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class avltree;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class avl_set;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class avl_multiset;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class avl_set_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class avl_set_member_hook;
|
||||
|
||||
|
||||
//treap/treap_set/treap_multiset
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class treap;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class treap_set;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class treap_multiset;
|
||||
|
||||
//sgtree/sg_set/sg_multiset
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class sgtree;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class sg_set;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class sg_multiset;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class bstree;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class bs_set;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class bs_multiset;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class bs_set_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class bs_set_member_hook;
|
||||
|
||||
//hashtable/unordered_set/unordered_multiset
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
, class O6 = void
|
||||
, class O7 = void
|
||||
, class O8 = void
|
||||
, class O9 = void
|
||||
, class O10 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class hashtable;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
, class O6 = void
|
||||
, class O7 = void
|
||||
, class O8 = void
|
||||
, class O9 = void
|
||||
, class O10 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class unordered_set;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
, class O5 = void
|
||||
, class O6 = void
|
||||
, class O7 = void
|
||||
, class O8 = void
|
||||
, class O9 = void
|
||||
, class O10 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class unordered_multiset;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class unordered_set_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
, class O4 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class unordered_set_member_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class any_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class any_member_hook;
|
||||
|
||||
//Options
|
||||
|
||||
template<bool Enabled>
|
||||
struct constant_time_size;
|
||||
|
||||
template<typename SizeType>
|
||||
struct size_type;
|
||||
|
||||
template<typename Compare>
|
||||
struct compare;
|
||||
|
||||
template<bool Enabled>
|
||||
struct floating_point;
|
||||
|
||||
template<typename Equal>
|
||||
struct equal;
|
||||
|
||||
template<typename Priority>
|
||||
struct priority;
|
||||
|
||||
template<typename Hash>
|
||||
struct hash;
|
||||
|
||||
template<typename ValueTraits> struct value_traits;
|
||||
|
||||
template< typename Parent
|
||||
, typename MemberHook
|
||||
, MemberHook Parent::* PtrToMember>
|
||||
struct member_hook;
|
||||
|
||||
template<typename Functor>
|
||||
struct function_hook;
|
||||
|
||||
template<typename BaseHook>
|
||||
struct base_hook;
|
||||
|
||||
template<typename VoidPointer>
|
||||
struct void_pointer;
|
||||
|
||||
template<typename Tag>
|
||||
struct tag;
|
||||
|
||||
template<link_mode_type LinkType>
|
||||
struct link_mode;
|
||||
|
||||
template<bool Enabled> struct
|
||||
optimize_size;
|
||||
|
||||
template<bool Enabled>
|
||||
struct linear;
|
||||
|
||||
template<bool Enabled>
|
||||
struct cache_last;
|
||||
|
||||
template<typename BucketTraits>
|
||||
struct bucket_traits;
|
||||
|
||||
template<bool Enabled>
|
||||
struct store_hash;
|
||||
|
||||
template<bool Enabled>
|
||||
struct optimize_multikey;
|
||||
|
||||
template<bool Enabled>
|
||||
struct power_2_buckets;
|
||||
|
||||
template<bool Enabled>
|
||||
struct cache_begin;
|
||||
|
||||
template<bool Enabled>
|
||||
struct compare_hash;
|
||||
|
||||
template<bool Enabled>
|
||||
struct incremental;
|
||||
|
||||
//Value traits
|
||||
|
||||
template<typename ValueTraits>
|
||||
struct value_traits;
|
||||
|
||||
template< typename Parent
|
||||
, typename MemberHook
|
||||
, MemberHook Parent::* PtrToMember>
|
||||
struct member_hook;
|
||||
|
||||
template< typename Functor>
|
||||
struct function_hook;
|
||||
|
||||
template<typename BaseHook>
|
||||
struct base_hook;
|
||||
|
||||
template<class T, class NodeTraits, link_mode_type LinkMode = safe_link>
|
||||
struct derivation_value_traits;
|
||||
|
||||
template<class NodeTraits, link_mode_type LinkMode = normal_link>
|
||||
struct trivial_value_traits;
|
||||
|
||||
//Additional utilities
|
||||
|
||||
template<typename VoidPointer, std::size_t Alignment>
|
||||
struct max_pointer_plus_bits;
|
||||
|
||||
template<std::size_t Alignment>
|
||||
struct max_pointer_plus_bits<void *, Alignment>;
|
||||
|
||||
template<typename Pointer, std::size_t NumBits>
|
||||
struct pointer_plus_bits;
|
||||
|
||||
template<typename T, std::size_t NumBits>
|
||||
struct pointer_plus_bits<T *, NumBits>;
|
||||
|
||||
template<typename Ptr>
|
||||
struct pointer_traits;
|
||||
|
||||
template<typename T>
|
||||
struct pointer_traits<T *>;
|
||||
|
||||
} //namespace intrusive {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
|
||||
#endif //#ifndef BOOST_INTRUSIVE_FWD_HPP
|
|
@ -1,63 +0,0 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2013
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/intrusive for documentation.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_LINK_MODE_HPP
|
||||
#define BOOST_INTRUSIVE_LINK_MODE_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
|
||||
//!This enumeration defines the type of value_traits that can be defined
|
||||
//!for Boost.Intrusive containers
|
||||
enum link_mode_type{
|
||||
//!If this linking policy is specified in a value_traits class
|
||||
//!as the link_mode, containers
|
||||
//!configured with such value_traits won't set the hooks
|
||||
//!of the erased values to a default state. Containers also won't
|
||||
//!check that the hooks of the new values are default initialized.
|
||||
normal_link,
|
||||
|
||||
//!If this linking policy is specified in a value_traits class
|
||||
//!as the link_mode, containers
|
||||
//!configured with such value_traits will set the hooks
|
||||
//!of the erased values to a default state. Containers also will
|
||||
//!check that the hooks of the new values are default initialized.
|
||||
safe_link,
|
||||
|
||||
//!Same as "safe_link" but the user type is an auto-unlink
|
||||
//!type, so the containers with constant-time size features won't be
|
||||
//!compatible with value_traits configured with this policy.
|
||||
//!Containers also know that the a value can be silently erased from
|
||||
//!the container without using any function provided by the containers.
|
||||
auto_unlink
|
||||
};
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
template <link_mode_type link_mode>
|
||||
struct is_safe_autounlink
|
||||
{
|
||||
static const bool value =
|
||||
(int)link_mode == (int)auto_unlink ||
|
||||
(int)link_mode == (int)safe_link;
|
||||
};
|
||||
|
||||
#endif //BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
} //namespace intrusive
|
||||
} //namespace boost
|
||||
|
||||
#endif //BOOST_INTRUSIVE_LINK_MODE_HPP
|
|
@ -11,11 +11,17 @@
|
|||
#ifndef BOOST_INTRUSIVE_POINTER_REBIND_HPP
|
||||
#define BOOST_INTRUSIVE_POINTER_REBIND_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#endif //BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
|
@ -165,12 +171,6 @@ template <template <class, class, class, class, class, class, class, class, clas
|
|||
struct pointer_rebinder<Ptr<A, P0, P1, P2, P3, P4, P5, P6, P7, P8>, U, 0u>
|
||||
{ typedef Ptr<U, P0, P1, P2, P3, P4, P5, P6, P7, P8> type; };
|
||||
|
||||
template <template <class, class, class, class, class, class, class, class, class, class, class> class Ptr //10arg
|
||||
, typename A, class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9
|
||||
, class U>
|
||||
struct pointer_rebinder<Ptr<A, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9>, U, 0u>
|
||||
{ typedef Ptr<U, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> type; };
|
||||
|
||||
#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template <typename Ptr, typename U>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2011-2013. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2011-2014. 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)
|
||||
//
|
||||
|
@ -17,26 +17,53 @@
|
|||
#ifndef BOOST_INTRUSIVE_POINTER_TRAITS_HPP
|
||||
#define BOOST_INTRUSIVE_POINTER_TRAITS_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#include <boost/intrusive/detail/memory_util.hpp>
|
||||
#include <boost/intrusive/pointer_rebind.hpp>
|
||||
#include <boost/intrusive/detail/pointer_element.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail {
|
||||
|
||||
#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1310)
|
||||
BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_member_function_callable_with_pointer_to, pointer_to)
|
||||
BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_member_function_callable_with_dynamic_cast_from, dynamic_cast_from)
|
||||
BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_member_function_callable_with_static_cast_from, static_cast_from)
|
||||
BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_member_function_callable_with_const_cast_from, const_cast_from)
|
||||
#else
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(has_member_function_callable_with_pointer_to, pointer_to)
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(has_member_function_callable_with_dynamic_cast_from, dynamic_cast_from)
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(has_member_function_callable_with_static_cast_from, static_cast_from)
|
||||
BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(has_member_function_callable_with_const_cast_from, const_cast_from)
|
||||
#endif
|
||||
|
||||
BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(element_type)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(value_traits_ptr)
|
||||
|
||||
} //namespace detail {
|
||||
|
||||
|
||||
//! pointer_traits is the implementation of C++11 std::pointer_traits class with some
|
||||
//! extensions like castings.
|
||||
//!
|
||||
//! pointer_traits supplies a uniform interface to certain attributes of pointer-like types.
|
||||
//!
|
||||
//! <b>Note</b>: When defining a custom family of pointers or references to be used with BI
|
||||
//! library, make sure the public static conversion functions accessed through
|
||||
//! the `pointer_traits` interface (`*_cast_from` and `pointer_to`) can
|
||||
//! properly convert between const and nonconst referred member types
|
||||
//! <b>without the use of implicit constructor calls</b>. It is suggested these
|
||||
//! conversions be implemented as function templates, where the template
|
||||
//! argument is the type of the object being converted from.
|
||||
template <typename Ptr>
|
||||
struct pointer_traits
|
||||
{
|
||||
|
@ -91,59 +118,83 @@ struct pointer_traits
|
|||
//! <b>Remark</b>: If element_type is (possibly cv-qualified) void, r type is unspecified; otherwise,
|
||||
//! it is element_type &.
|
||||
//!
|
||||
//! <b>Returns</b>: A dereferenceable pointer to r obtained by calling Ptr::pointer_to(r).
|
||||
//! <b>Returns</b>: A dereferenceable pointer to r obtained by calling Ptr::pointer_to(reference).
|
||||
//! Non-standard extension: If such function does not exist, returns pointer(addressof(r));
|
||||
//!
|
||||
//! <b>Note</b>: For non-conforming compilers only the existence of a member function called
|
||||
//! <code>pointer_to</code> is checked.
|
||||
static pointer pointer_to(reference r)
|
||||
{
|
||||
//Non-standard extension, it does not require Ptr::pointer_to. If not present
|
||||
//tries to converts &r to pointer.
|
||||
const bool value = boost::intrusive::detail::
|
||||
has_member_function_callable_with_pointer_to
|
||||
<Ptr, reference>::value;
|
||||
<Ptr, Ptr (*)(reference)>::value;
|
||||
boost::intrusive::detail::bool_<value> flag;
|
||||
return pointer_traits::priv_pointer_to(flag, r);
|
||||
}
|
||||
|
||||
//! <b>Remark</b>: Non-standard extension.
|
||||
//!
|
||||
//! <b>Returns</b>: A dereferenceable pointer to r obtained by calling Ptr::static_cast_from(r).
|
||||
//! <b>Returns</b>: A dereferenceable pointer to r obtained by calling the static template function
|
||||
//! Ptr::static_cast_from(UPpr/const UPpr &).
|
||||
//! If such function does not exist, returns pointer_to(static_cast<element_type&>(*uptr))
|
||||
//!
|
||||
//! <b>Note</b>: For non-conforming compilers only the existence of a member function called
|
||||
//! <code>static_cast_from</code> is checked.
|
||||
template<class UPtr>
|
||||
static pointer static_cast_from(const UPtr &uptr)
|
||||
{
|
||||
typedef const UPtr &RefArg;
|
||||
const bool value = boost::intrusive::detail::
|
||||
has_member_function_callable_with_static_cast_from
|
||||
<Ptr, const UPtr>::value;
|
||||
boost::intrusive::detail::bool_<value> flag;
|
||||
return pointer_traits::priv_static_cast_from(flag, uptr);
|
||||
<pointer, pointer(*)(RefArg)>::value
|
||||
|| boost::intrusive::detail::
|
||||
has_member_function_callable_with_static_cast_from
|
||||
<pointer, pointer(*)(UPtr)>::value;
|
||||
return pointer_traits::priv_static_cast_from(boost::intrusive::detail::bool_<value>(), uptr);
|
||||
}
|
||||
|
||||
//! <b>Remark</b>: Non-standard extension.
|
||||
//!
|
||||
//! <b>Returns</b>: A dereferenceable pointer to r obtained by calling Ptr::const_cast_from(r).
|
||||
//! <b>Returns</b>: A dereferenceable pointer to r obtained by calling the static template function
|
||||
//! Ptr::const_cast_from<UPtr>(UPpr/const UPpr &).
|
||||
//! If such function does not exist, returns pointer_to(const_cast<element_type&>(*uptr))
|
||||
//!
|
||||
//! <b>Note</b>: For non-conforming compilers only the existence of a member function called
|
||||
//! <code>const_cast_from</code> is checked.
|
||||
template<class UPtr>
|
||||
static pointer const_cast_from(const UPtr &uptr)
|
||||
{
|
||||
typedef const UPtr &RefArg;
|
||||
const bool value = boost::intrusive::detail::
|
||||
has_member_function_callable_with_const_cast_from
|
||||
<Ptr, const UPtr>::value;
|
||||
boost::intrusive::detail::bool_<value> flag;
|
||||
return pointer_traits::priv_const_cast_from(flag, uptr);
|
||||
<pointer, pointer(*)(RefArg)>::value
|
||||
|| boost::intrusive::detail::
|
||||
has_member_function_callable_with_const_cast_from
|
||||
<pointer, pointer(*)(UPtr)>::value;
|
||||
return pointer_traits::priv_const_cast_from(boost::intrusive::detail::bool_<value>(), uptr);
|
||||
}
|
||||
|
||||
//! <b>Remark</b>: Non-standard extension.
|
||||
//!
|
||||
//! <b>Returns</b>: A dereferenceable pointer to r obtained by calling Ptr::dynamic_cast_from(r).
|
||||
//! <b>Returns</b>: A dereferenceable pointer to r obtained by calling the static template function
|
||||
//! Ptr::dynamic_cast_from<UPtr>(UPpr/const UPpr &).
|
||||
//! If such function does not exist, returns pointer_to(*dynamic_cast<element_type*>(&*uptr))
|
||||
//!
|
||||
//! <b>Note</b>: For non-conforming compilers only the existence of a member function called
|
||||
//! <code>dynamic_cast_from</code> is checked.
|
||||
template<class UPtr>
|
||||
static pointer dynamic_cast_from(const UPtr &uptr)
|
||||
{
|
||||
typedef const UPtr &RefArg;
|
||||
const bool value = boost::intrusive::detail::
|
||||
has_member_function_callable_with_dynamic_cast_from
|
||||
<Ptr, const UPtr>::value;
|
||||
boost::intrusive::detail::bool_<value> flag;
|
||||
return pointer_traits::priv_dynamic_cast_from(flag, uptr);
|
||||
<pointer, pointer(*)(RefArg)>::value
|
||||
|| boost::intrusive::detail::
|
||||
has_member_function_callable_with_dynamic_cast_from
|
||||
<pointer, pointer(*)(UPtr)>::value;
|
||||
return pointer_traits::priv_dynamic_cast_from(boost::intrusive::detail::bool_<value>(), uptr);
|
||||
}
|
||||
|
||||
///@cond
|
||||
|
|
|
@ -14,6 +14,14 @@
|
|||
#ifndef BOOST_MOVE_ALGORITHM_HPP
|
||||
#define BOOST_MOVE_ALGORITHM_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
|
|
@ -16,7 +16,16 @@
|
|||
#ifndef BOOST_MOVE_CORE_HPP
|
||||
#define BOOST_MOVE_CORE_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/move/detail/workaround.hpp>
|
||||
|
||||
//boost_move_no_copy_constructor_or_assign typedef
|
||||
//used to detect noncopyable types for other Boost libraries.
|
||||
|
@ -42,7 +51,7 @@
|
|||
|
||||
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
|
||||
|
||||
#include <boost/move/detail/meta_utils.hpp>
|
||||
#include <boost/move/detail/type_traits.hpp>
|
||||
|
||||
//Move emulation rv breaks standard aliasing rules so add workarounds for some compilers
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4) && \
|
||||
|
@ -65,7 +74,7 @@
|
|||
template <class T>
|
||||
class rv
|
||||
: public ::boost::move_detail::if_c
|
||||
< ::boost::move_detail::is_class_or_union<T>::value
|
||||
< ::boost::move_detail::is_class<T>::value
|
||||
, T
|
||||
, ::boost::move_detail::nat
|
||||
>::type
|
||||
|
@ -194,6 +203,10 @@
|
|||
boost::move_detail::move_return< RET_TYPE >(REF)
|
||||
//
|
||||
|
||||
#define BOOST_MOVE_BASE(BASE_TYPE, ARG) \
|
||||
::boost::move((BASE_TYPE&)(ARG))
|
||||
//
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// BOOST_MOVABLE_BUT_NOT_COPYABLE
|
||||
|
@ -251,23 +264,6 @@
|
|||
|
||||
#else //BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
//Compiler workaround detection
|
||||
#if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
|
||||
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5) && !defined(__clang__)
|
||||
//Pre-standard rvalue binding rules
|
||||
#define BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
|
||||
#elif defined(_MSC_VER) && (_MSC_VER == 1600)
|
||||
//Standard rvalue binding rules but with some bugs
|
||||
#define BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG
|
||||
#define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG
|
||||
//Use standard library for MSVC to avoid namespace issues as
|
||||
//some move calls in the STL are not fully qualified.
|
||||
//#define BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE
|
||||
#elif defined(_MSC_VER) && (_MSC_VER == 1700)
|
||||
#define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//! This macro marks a type as movable but not copyable, disabling copy construction
|
||||
//! and assignment. The user will need to write a move constructor/assignment as explained
|
||||
//! in the documentation to fully write a movable but not copyable class.
|
||||
|
@ -369,7 +365,6 @@
|
|||
const TYPE & \
|
||||
//
|
||||
|
||||
|
||||
#endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
|
||||
|
||||
#if !defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED)
|
||||
|
@ -432,6 +427,17 @@
|
|||
|
||||
#endif //!defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED)
|
||||
|
||||
//!This macro is used to achieve portable optimal move constructors.
|
||||
//!
|
||||
//!When implementing the move constructor, in C++03 compilers the moved-from argument must be
|
||||
//!cast to the base type before calling `::boost::move()` due to rvalue reference limitations.
|
||||
//!
|
||||
//!In C++11 compilers the cast from a rvalue reference of a derived type to a rvalue reference of
|
||||
//!a base type is implicit.
|
||||
#define BOOST_MOVE_BASE(BASE_TYPE, ARG) \
|
||||
::boost::move((BASE_TYPE&)(ARG))
|
||||
//
|
||||
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning (push)
|
||||
# pragma warning (disable : 4996) // "function": was declared deprecated (_CRT_SECURE_NO_DEPRECATE/_SCL_SECURE_NO_WARNINGS)
|
||||
# pragma warning (disable : 4324) // structure was padded due to __declspec(align())
|
||||
# pragma warning (disable : 4675) // "function": resolved overload was found by argument-dependent lookup
|
||||
# pragma warning (disable : 4996) // "function": was declared deprecated (_CRT_SECURE_NO_DEPRECATE/_SCL_SECURE_NO_WARNINGS)
|
||||
#endif
|
||||
|
|
465
miniboost/boost/move/detail/fwd_macros.hpp
Normal file
465
miniboost/boost/move/detail/fwd_macros.hpp
Normal file
|
@ -0,0 +1,465 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_MOVE_DETAIL_FWD_MACROS_HPP
|
||||
#define BOOST_MOVE_DETAIL_FWD_MACROS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/workaround.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
template <typename T> struct unvoid { typedef T type; };
|
||||
template <> struct unvoid<void> { struct type { }; };
|
||||
template <> struct unvoid<const void> { struct type { }; };
|
||||
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
|
||||
#if defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
template<class T>
|
||||
struct mref;
|
||||
|
||||
template<class T>
|
||||
struct mref<T &>
|
||||
{
|
||||
explicit mref(T &t) : t_(t){}
|
||||
T &t_;
|
||||
T & get() { return t_; }
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct mref
|
||||
{
|
||||
explicit mref(T &&t) : t_(t) {}
|
||||
T &t_;
|
||||
T &&get() { return ::boost::move(t_); }
|
||||
};
|
||||
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG
|
||||
#endif //!defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
|
||||
//BOOST_MOVE_REPEATN(MACRO)
|
||||
#define BOOST_MOVE_REPEAT0(MACRO)
|
||||
#define BOOST_MOVE_REPEAT1(MACRO) MACRO
|
||||
#define BOOST_MOVE_REPEAT2(MACRO) BOOST_MOVE_REPEAT1(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT3(MACRO) BOOST_MOVE_REPEAT2(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT4(MACRO) BOOST_MOVE_REPEAT3(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT5(MACRO) BOOST_MOVE_REPEAT4(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT6(MACRO) BOOST_MOVE_REPEAT5(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT7(MACRO) BOOST_MOVE_REPEAT6(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT8(MACRO) BOOST_MOVE_REPEAT7(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT9(MACRO) BOOST_MOVE_REPEAT8(MACRO), MACRO
|
||||
|
||||
//BOOST_MOVE_FWDN
|
||||
#define BOOST_MOVE_FWD0
|
||||
#define BOOST_MOVE_FWD1 ::boost::forward<P0>(p0)
|
||||
#define BOOST_MOVE_FWD2 BOOST_MOVE_FWD1, ::boost::forward<P1>(p1)
|
||||
#define BOOST_MOVE_FWD3 BOOST_MOVE_FWD2, ::boost::forward<P2>(p2)
|
||||
#define BOOST_MOVE_FWD4 BOOST_MOVE_FWD3, ::boost::forward<P3>(p3)
|
||||
#define BOOST_MOVE_FWD5 BOOST_MOVE_FWD4, ::boost::forward<P4>(p4)
|
||||
#define BOOST_MOVE_FWD6 BOOST_MOVE_FWD5, ::boost::forward<P5>(p5)
|
||||
#define BOOST_MOVE_FWD7 BOOST_MOVE_FWD6, ::boost::forward<P6>(p6)
|
||||
#define BOOST_MOVE_FWD8 BOOST_MOVE_FWD7, ::boost::forward<P7>(p7)
|
||||
#define BOOST_MOVE_FWD9 BOOST_MOVE_FWD8, ::boost::forward<P8>(p8)
|
||||
|
||||
//BOOST_MOVE_FWDQN
|
||||
#define BOOST_MOVE_FWDQ0
|
||||
#define BOOST_MOVE_FWDQ1 ::boost::forward<Q0>(q0)
|
||||
#define BOOST_MOVE_FWDQ2 BOOST_MOVE_FWDQ1, ::boost::forward<Q1>(q1)
|
||||
#define BOOST_MOVE_FWDQ3 BOOST_MOVE_FWDQ2, ::boost::forward<Q2>(q2)
|
||||
#define BOOST_MOVE_FWDQ4 BOOST_MOVE_FWDQ3, ::boost::forward<Q3>(q3)
|
||||
#define BOOST_MOVE_FWDQ5 BOOST_MOVE_FWDQ4, ::boost::forward<Q4>(q4)
|
||||
#define BOOST_MOVE_FWDQ6 BOOST_MOVE_FWDQ5, ::boost::forward<Q5>(q5)
|
||||
#define BOOST_MOVE_FWDQ7 BOOST_MOVE_FWDQ6, ::boost::forward<Q6>(q6)
|
||||
#define BOOST_MOVE_FWDQ8 BOOST_MOVE_FWDQ7, ::boost::forward<Q7>(q7)
|
||||
#define BOOST_MOVE_FWDQ9 BOOST_MOVE_FWDQ8, ::boost::forward<Q8>(q8)
|
||||
|
||||
//BOOST_MOVE_ARGN
|
||||
#define BOOST_MOVE_ARG0
|
||||
#define BOOST_MOVE_ARG1 p0
|
||||
#define BOOST_MOVE_ARG2 BOOST_MOVE_ARG1, p1
|
||||
#define BOOST_MOVE_ARG3 BOOST_MOVE_ARG2, p2
|
||||
#define BOOST_MOVE_ARG4 BOOST_MOVE_ARG3, p3
|
||||
#define BOOST_MOVE_ARG5 BOOST_MOVE_ARG4, p4
|
||||
#define BOOST_MOVE_ARG6 BOOST_MOVE_ARG5, p5
|
||||
#define BOOST_MOVE_ARG7 BOOST_MOVE_ARG6, p6
|
||||
#define BOOST_MOVE_ARG8 BOOST_MOVE_ARG7, p7
|
||||
#define BOOST_MOVE_ARG9 BOOST_MOVE_ARG8, p8
|
||||
|
||||
//BOOST_MOVE_DECLVALN
|
||||
#define BOOST_MOVE_DECLVAL0
|
||||
#define BOOST_MOVE_DECLVAL1 ::boost::move_detail::declval<P0>()
|
||||
#define BOOST_MOVE_DECLVAL2 BOOST_MOVE_DECLVAL1, ::boost::move_detail::declval<P1>()
|
||||
#define BOOST_MOVE_DECLVAL3 BOOST_MOVE_DECLVAL2, ::boost::move_detail::declval<P2>()
|
||||
#define BOOST_MOVE_DECLVAL4 BOOST_MOVE_DECLVAL3, ::boost::move_detail::declval<P3>()
|
||||
#define BOOST_MOVE_DECLVAL5 BOOST_MOVE_DECLVAL4, ::boost::move_detail::declval<P4>()
|
||||
#define BOOST_MOVE_DECLVAL6 BOOST_MOVE_DECLVAL5, ::boost::move_detail::declval<P5>()
|
||||
#define BOOST_MOVE_DECLVAL7 BOOST_MOVE_DECLVAL6, ::boost::move_detail::declval<P6>()
|
||||
#define BOOST_MOVE_DECLVAL8 BOOST_MOVE_DECLVAL7, ::boost::move_detail::declval<P7>()
|
||||
#define BOOST_MOVE_DECLVAL9 BOOST_MOVE_DECLVAL8, ::boost::move_detail::declval<P8>()
|
||||
|
||||
#ifdef BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG
|
||||
#define BOOST_MOVE_MREF(T) ::boost::move_detail::mref<T>
|
||||
#define BOOST_MOVE_MFWD(N) ::boost::forward<P##N>(this->m_p##N.get())
|
||||
#else
|
||||
#define BOOST_MOVE_MREF(T) BOOST_FWD_REF(T)
|
||||
#define BOOST_MOVE_MFWD(N) ::boost::forward<P##N>(this->m_p##N)
|
||||
#endif
|
||||
#define BOOST_MOVE_MITFWD(N) *this->m_p##N
|
||||
#define BOOST_MOVE_MINC(N) ++this->m_p##N
|
||||
|
||||
//BOOST_MOVE_MFWDN
|
||||
#define BOOST_MOVE_MFWD0
|
||||
#define BOOST_MOVE_MFWD1 BOOST_MOVE_MFWD(0)
|
||||
#define BOOST_MOVE_MFWD2 BOOST_MOVE_MFWD1, BOOST_MOVE_MFWD(1)
|
||||
#define BOOST_MOVE_MFWD3 BOOST_MOVE_MFWD2, BOOST_MOVE_MFWD(2)
|
||||
#define BOOST_MOVE_MFWD4 BOOST_MOVE_MFWD3, BOOST_MOVE_MFWD(3)
|
||||
#define BOOST_MOVE_MFWD5 BOOST_MOVE_MFWD4, BOOST_MOVE_MFWD(4)
|
||||
#define BOOST_MOVE_MFWD6 BOOST_MOVE_MFWD5, BOOST_MOVE_MFWD(5)
|
||||
#define BOOST_MOVE_MFWD7 BOOST_MOVE_MFWD6, BOOST_MOVE_MFWD(6)
|
||||
#define BOOST_MOVE_MFWD8 BOOST_MOVE_MFWD7, BOOST_MOVE_MFWD(7)
|
||||
#define BOOST_MOVE_MFWD9 BOOST_MOVE_MFWD8, BOOST_MOVE_MFWD(8)
|
||||
|
||||
//BOOST_MOVE_MINCN
|
||||
#define BOOST_MOVE_MINC0
|
||||
#define BOOST_MOVE_MINC1 BOOST_MOVE_MINC(0)
|
||||
#define BOOST_MOVE_MINC2 BOOST_MOVE_MINC1, BOOST_MOVE_MINC(1)
|
||||
#define BOOST_MOVE_MINC3 BOOST_MOVE_MINC2, BOOST_MOVE_MINC(2)
|
||||
#define BOOST_MOVE_MINC4 BOOST_MOVE_MINC3, BOOST_MOVE_MINC(3)
|
||||
#define BOOST_MOVE_MINC5 BOOST_MOVE_MINC4, BOOST_MOVE_MINC(4)
|
||||
#define BOOST_MOVE_MINC6 BOOST_MOVE_MINC5, BOOST_MOVE_MINC(5)
|
||||
#define BOOST_MOVE_MINC7 BOOST_MOVE_MINC6, BOOST_MOVE_MINC(6)
|
||||
#define BOOST_MOVE_MINC8 BOOST_MOVE_MINC7, BOOST_MOVE_MINC(7)
|
||||
#define BOOST_MOVE_MINC9 BOOST_MOVE_MINC8, BOOST_MOVE_MINC(8)
|
||||
|
||||
//BOOST_MOVE_MITFWDN
|
||||
#define BOOST_MOVE_MITFWD0
|
||||
#define BOOST_MOVE_MITFWD1 BOOST_MOVE_MITFWD(0)
|
||||
#define BOOST_MOVE_MITFWD2 BOOST_MOVE_MITFWD1, BOOST_MOVE_MITFWD(1)
|
||||
#define BOOST_MOVE_MITFWD3 BOOST_MOVE_MITFWD2, BOOST_MOVE_MITFWD(2)
|
||||
#define BOOST_MOVE_MITFWD4 BOOST_MOVE_MITFWD3, BOOST_MOVE_MITFWD(3)
|
||||
#define BOOST_MOVE_MITFWD5 BOOST_MOVE_MITFWD4, BOOST_MOVE_MITFWD(4)
|
||||
#define BOOST_MOVE_MITFWD6 BOOST_MOVE_MITFWD5, BOOST_MOVE_MITFWD(5)
|
||||
#define BOOST_MOVE_MITFWD7 BOOST_MOVE_MITFWD6, BOOST_MOVE_MITFWD(6)
|
||||
#define BOOST_MOVE_MITFWD8 BOOST_MOVE_MITFWD7, BOOST_MOVE_MITFWD(7)
|
||||
#define BOOST_MOVE_MITFWD9 BOOST_MOVE_MITFWD8, BOOST_MOVE_MITFWD(8)
|
||||
|
||||
|
||||
//BOOST_MOVE_FWD_INITN
|
||||
#define BOOST_MOVE_FWD_INIT0
|
||||
#define BOOST_MOVE_FWD_INIT1 m_p0(::boost::forward<P0>(p0))
|
||||
#define BOOST_MOVE_FWD_INIT2 BOOST_MOVE_FWD_INIT1, m_p1(::boost::forward<P1>(p1))
|
||||
#define BOOST_MOVE_FWD_INIT3 BOOST_MOVE_FWD_INIT2, m_p2(::boost::forward<P2>(p2))
|
||||
#define BOOST_MOVE_FWD_INIT4 BOOST_MOVE_FWD_INIT3, m_p3(::boost::forward<P3>(p3))
|
||||
#define BOOST_MOVE_FWD_INIT5 BOOST_MOVE_FWD_INIT4, m_p4(::boost::forward<P4>(p4))
|
||||
#define BOOST_MOVE_FWD_INIT6 BOOST_MOVE_FWD_INIT5, m_p5(::boost::forward<P5>(p5))
|
||||
#define BOOST_MOVE_FWD_INIT7 BOOST_MOVE_FWD_INIT6, m_p6(::boost::forward<P6>(p6))
|
||||
#define BOOST_MOVE_FWD_INIT8 BOOST_MOVE_FWD_INIT7, m_p7(::boost::forward<P7>(p7))
|
||||
#define BOOST_MOVE_FWD_INIT9 BOOST_MOVE_FWD_INIT8, m_p8(::boost::forward<P8>(p8))
|
||||
|
||||
//BOOST_MOVE_VAL_INITN
|
||||
#define BOOST_MOVE_VAL_INIT0
|
||||
#define BOOST_MOVE_VAL_INIT1 m_p0(p0)
|
||||
#define BOOST_MOVE_VAL_INIT2 BOOST_MOVE_VAL_INIT1, m_p1(p1)
|
||||
#define BOOST_MOVE_VAL_INIT3 BOOST_MOVE_VAL_INIT2, m_p2(p2)
|
||||
#define BOOST_MOVE_VAL_INIT4 BOOST_MOVE_VAL_INIT3, m_p3(p3)
|
||||
#define BOOST_MOVE_VAL_INIT5 BOOST_MOVE_VAL_INIT4, m_p4(p4)
|
||||
#define BOOST_MOVE_VAL_INIT6 BOOST_MOVE_VAL_INIT5, m_p5(p5)
|
||||
#define BOOST_MOVE_VAL_INIT7 BOOST_MOVE_VAL_INIT6, m_p6(p6)
|
||||
#define BOOST_MOVE_VAL_INIT8 BOOST_MOVE_VAL_INIT7, m_p7(p7)
|
||||
#define BOOST_MOVE_VAL_INIT9 BOOST_MOVE_VAL_INIT8, m_p8(p8)
|
||||
|
||||
//BOOST_MOVE_UREFN
|
||||
#define BOOST_MOVE_UREF0
|
||||
#define BOOST_MOVE_UREF1 BOOST_FWD_REF(P0) p0
|
||||
#define BOOST_MOVE_UREF2 BOOST_MOVE_UREF1, BOOST_FWD_REF(P1) p1
|
||||
#define BOOST_MOVE_UREF3 BOOST_MOVE_UREF2, BOOST_FWD_REF(P2) p2
|
||||
#define BOOST_MOVE_UREF4 BOOST_MOVE_UREF3, BOOST_FWD_REF(P3) p3
|
||||
#define BOOST_MOVE_UREF5 BOOST_MOVE_UREF4, BOOST_FWD_REF(P4) p4
|
||||
#define BOOST_MOVE_UREF6 BOOST_MOVE_UREF5, BOOST_FWD_REF(P5) p5
|
||||
#define BOOST_MOVE_UREF7 BOOST_MOVE_UREF6, BOOST_FWD_REF(P6) p6
|
||||
#define BOOST_MOVE_UREF8 BOOST_MOVE_UREF7, BOOST_FWD_REF(P7) p7
|
||||
#define BOOST_MOVE_UREF9 BOOST_MOVE_UREF8, BOOST_FWD_REF(P8) p8
|
||||
|
||||
//BOOST_MOVE_VALN
|
||||
#define BOOST_MOVE_VAL0
|
||||
#define BOOST_MOVE_VAL1 P0 p0
|
||||
#define BOOST_MOVE_VAL2 BOOST_MOVE_VAL1, BOOST_FWD_REF(P1) p1
|
||||
#define BOOST_MOVE_VAL3 BOOST_MOVE_VAL2, BOOST_FWD_REF(P2) p2
|
||||
#define BOOST_MOVE_VAL4 BOOST_MOVE_VAL3, BOOST_FWD_REF(P3) p3
|
||||
#define BOOST_MOVE_VAL5 BOOST_MOVE_VAL4, BOOST_FWD_REF(P4) p4
|
||||
#define BOOST_MOVE_VAL6 BOOST_MOVE_VAL5, BOOST_FWD_REF(P5) p5
|
||||
#define BOOST_MOVE_VAL7 BOOST_MOVE_VAL6, BOOST_FWD_REF(P6) p6
|
||||
#define BOOST_MOVE_VAL8 BOOST_MOVE_VAL7, BOOST_FWD_REF(P7) p7
|
||||
#define BOOST_MOVE_VAL9 BOOST_MOVE_VAL8, BOOST_FWD_REF(P8) p8
|
||||
|
||||
//BOOST_MOVE_UREFQN
|
||||
#define BOOST_MOVE_UREFQ0
|
||||
#define BOOST_MOVE_UREFQ1 BOOST_FWD_REF(Q0) q0
|
||||
#define BOOST_MOVE_UREFQ2 BOOST_MOVE_UREFQ1, BOOST_FWD_REF(Q1) q1
|
||||
#define BOOST_MOVE_UREFQ3 BOOST_MOVE_UREFQ2, BOOST_FWD_REF(Q2) q2
|
||||
#define BOOST_MOVE_UREFQ4 BOOST_MOVE_UREFQ3, BOOST_FWD_REF(Q3) q3
|
||||
#define BOOST_MOVE_UREFQ5 BOOST_MOVE_UREFQ4, BOOST_FWD_REF(Q4) q4
|
||||
#define BOOST_MOVE_UREFQ6 BOOST_MOVE_UREFQ5, BOOST_FWD_REF(Q5) q5
|
||||
#define BOOST_MOVE_UREFQ7 BOOST_MOVE_UREFQ6, BOOST_FWD_REF(Q6) q6
|
||||
#define BOOST_MOVE_UREFQ8 BOOST_MOVE_UREFQ7, BOOST_FWD_REF(Q7) q7
|
||||
#define BOOST_MOVE_UREFQ9 BOOST_MOVE_UREFQ8, BOOST_FWD_REF(Q8) q8
|
||||
|
||||
//BOOST_MOVE_CREFN
|
||||
#define BOOST_MOVE_UNVOIDCREF(T) const typename boost::move_detail::unvoid<T>::type&
|
||||
#define BOOST_MOVE_CREF0
|
||||
#define BOOST_MOVE_CREF1 BOOST_MOVE_UNVOIDCREF(P0) p0
|
||||
#define BOOST_MOVE_CREF2 BOOST_MOVE_CREF1, BOOST_MOVE_UNVOIDCREF(P1) p1
|
||||
#define BOOST_MOVE_CREF3 BOOST_MOVE_CREF2, BOOST_MOVE_UNVOIDCREF(P2) p2
|
||||
#define BOOST_MOVE_CREF4 BOOST_MOVE_CREF3, BOOST_MOVE_UNVOIDCREF(P3) p3
|
||||
#define BOOST_MOVE_CREF5 BOOST_MOVE_CREF4, BOOST_MOVE_UNVOIDCREF(P4) p4
|
||||
#define BOOST_MOVE_CREF6 BOOST_MOVE_CREF5, BOOST_MOVE_UNVOIDCREF(P5) p5
|
||||
#define BOOST_MOVE_CREF7 BOOST_MOVE_CREF6, BOOST_MOVE_UNVOIDCREF(P6) p6
|
||||
#define BOOST_MOVE_CREF8 BOOST_MOVE_CREF7, BOOST_MOVE_UNVOIDCREF(P7) p7
|
||||
#define BOOST_MOVE_CREF9 BOOST_MOVE_CREF8, BOOST_MOVE_UNVOIDCREF(P8) p8
|
||||
|
||||
//BOOST_MOVE_CLASSN
|
||||
#define BOOST_MOVE_CLASS0
|
||||
#define BOOST_MOVE_CLASS1 class P0
|
||||
#define BOOST_MOVE_CLASS2 BOOST_MOVE_CLASS1, class P1
|
||||
#define BOOST_MOVE_CLASS3 BOOST_MOVE_CLASS2, class P2
|
||||
#define BOOST_MOVE_CLASS4 BOOST_MOVE_CLASS3, class P3
|
||||
#define BOOST_MOVE_CLASS5 BOOST_MOVE_CLASS4, class P4
|
||||
#define BOOST_MOVE_CLASS6 BOOST_MOVE_CLASS5, class P5
|
||||
#define BOOST_MOVE_CLASS7 BOOST_MOVE_CLASS6, class P6
|
||||
#define BOOST_MOVE_CLASS8 BOOST_MOVE_CLASS7, class P7
|
||||
#define BOOST_MOVE_CLASS9 BOOST_MOVE_CLASS8, class P8
|
||||
|
||||
//BOOST_MOVE_CLASSQN
|
||||
#define BOOST_MOVE_CLASSQ0
|
||||
#define BOOST_MOVE_CLASSQ1 class Q0
|
||||
#define BOOST_MOVE_CLASSQ2 BOOST_MOVE_CLASSQ1, class Q1
|
||||
#define BOOST_MOVE_CLASSQ3 BOOST_MOVE_CLASSQ2, class Q2
|
||||
#define BOOST_MOVE_CLASSQ4 BOOST_MOVE_CLASSQ3, class Q3
|
||||
#define BOOST_MOVE_CLASSQ5 BOOST_MOVE_CLASSQ4, class Q4
|
||||
#define BOOST_MOVE_CLASSQ6 BOOST_MOVE_CLASSQ5, class Q5
|
||||
#define BOOST_MOVE_CLASSQ7 BOOST_MOVE_CLASSQ6, class Q6
|
||||
#define BOOST_MOVE_CLASSQ8 BOOST_MOVE_CLASSQ7, class Q7
|
||||
#define BOOST_MOVE_CLASSQ9 BOOST_MOVE_CLASSQ8, class Q8
|
||||
|
||||
//BOOST_MOVE_CLASSDFLTN
|
||||
#define BOOST_MOVE_CLASSDFLT0
|
||||
#define BOOST_MOVE_CLASSDFLT1 class P0 = void
|
||||
#define BOOST_MOVE_CLASSDFLT2 BOOST_MOVE_CLASSDFLT1, class P1 = void
|
||||
#define BOOST_MOVE_CLASSDFLT3 BOOST_MOVE_CLASSDFLT2, class P2 = void
|
||||
#define BOOST_MOVE_CLASSDFLT4 BOOST_MOVE_CLASSDFLT3, class P3 = void
|
||||
#define BOOST_MOVE_CLASSDFLT5 BOOST_MOVE_CLASSDFLT4, class P4 = void
|
||||
#define BOOST_MOVE_CLASSDFLT6 BOOST_MOVE_CLASSDFLT5, class P5 = void
|
||||
#define BOOST_MOVE_CLASSDFLT7 BOOST_MOVE_CLASSDFLT6, class P6 = void
|
||||
#define BOOST_MOVE_CLASSDFLT8 BOOST_MOVE_CLASSDFLT7, class P7 = void
|
||||
#define BOOST_MOVE_CLASSDFLT9 BOOST_MOVE_CLASSDFLT8, class P8 = void
|
||||
|
||||
//BOOST_MOVE_TARGN
|
||||
#define BOOST_MOVE_TARG0
|
||||
#define BOOST_MOVE_TARG1 P0
|
||||
#define BOOST_MOVE_TARG2 BOOST_MOVE_TARG1, P1
|
||||
#define BOOST_MOVE_TARG3 BOOST_MOVE_TARG2, P2
|
||||
#define BOOST_MOVE_TARG4 BOOST_MOVE_TARG3, P3
|
||||
#define BOOST_MOVE_TARG5 BOOST_MOVE_TARG4, P4
|
||||
#define BOOST_MOVE_TARG6 BOOST_MOVE_TARG5, P5
|
||||
#define BOOST_MOVE_TARG7 BOOST_MOVE_TARG6, P6
|
||||
#define BOOST_MOVE_TARG8 BOOST_MOVE_TARG7, P7
|
||||
#define BOOST_MOVE_TARG9 BOOST_MOVE_TARG8, P8
|
||||
|
||||
//BOOST_MOVE_FWD_TN
|
||||
#define BOOST_MOVE_FWD_T0
|
||||
#define BOOST_MOVE_FWD_T1 typename ::boost::move_detail::forward_type<P0>::type
|
||||
#define BOOST_MOVE_FWD_T2 BOOST_MOVE_FWD_T1, typename ::boost::move_detail::forward_type<P1>::type
|
||||
#define BOOST_MOVE_FWD_T3 BOOST_MOVE_FWD_T2, typename ::boost::move_detail::forward_type<P2>::type
|
||||
#define BOOST_MOVE_FWD_T4 BOOST_MOVE_FWD_T3, typename ::boost::move_detail::forward_type<P3>::type
|
||||
#define BOOST_MOVE_FWD_T5 BOOST_MOVE_FWD_T4, typename ::boost::move_detail::forward_type<P4>::type
|
||||
#define BOOST_MOVE_FWD_T6 BOOST_MOVE_FWD_T5, typename ::boost::move_detail::forward_type<P5>::type
|
||||
#define BOOST_MOVE_FWD_T7 BOOST_MOVE_FWD_T6, typename ::boost::move_detail::forward_type<P6>::type
|
||||
#define BOOST_MOVE_FWD_T8 BOOST_MOVE_FWD_T7, typename ::boost::move_detail::forward_type<P7>::type
|
||||
#define BOOST_MOVE_FWD_T9 BOOST_MOVE_FWD_T8, typename ::boost::move_detail::forward_type<P8>::type
|
||||
|
||||
//BOOST_MOVE_MREFX
|
||||
#define BOOST_MOVE_MREF0
|
||||
#define BOOST_MOVE_MREF1 BOOST_MOVE_MREF(P0) m_p0;
|
||||
#define BOOST_MOVE_MREF2 BOOST_MOVE_MREF1 BOOST_MOVE_MREF(P1) m_p1;
|
||||
#define BOOST_MOVE_MREF3 BOOST_MOVE_MREF2 BOOST_MOVE_MREF(P2) m_p2;
|
||||
#define BOOST_MOVE_MREF4 BOOST_MOVE_MREF3 BOOST_MOVE_MREF(P3) m_p3;
|
||||
#define BOOST_MOVE_MREF5 BOOST_MOVE_MREF4 BOOST_MOVE_MREF(P4) m_p4;
|
||||
#define BOOST_MOVE_MREF6 BOOST_MOVE_MREF5 BOOST_MOVE_MREF(P5) m_p5;
|
||||
#define BOOST_MOVE_MREF7 BOOST_MOVE_MREF6 BOOST_MOVE_MREF(P6) m_p6;
|
||||
#define BOOST_MOVE_MREF8 BOOST_MOVE_MREF7 BOOST_MOVE_MREF(P7) m_p7;
|
||||
#define BOOST_MOVE_MREF9 BOOST_MOVE_MREF8 BOOST_MOVE_MREF(P8) m_p8;
|
||||
|
||||
//BOOST_MOVE_MEMBX
|
||||
#define BOOST_MOVE_MEMB0
|
||||
#define BOOST_MOVE_MEMB1 P0 m_p0;
|
||||
#define BOOST_MOVE_MEMB2 BOOST_MOVE_MEMB1 P1 m_p1;
|
||||
#define BOOST_MOVE_MEMB3 BOOST_MOVE_MEMB2 P2 m_p2;
|
||||
#define BOOST_MOVE_MEMB4 BOOST_MOVE_MEMB3 P3 m_p3;
|
||||
#define BOOST_MOVE_MEMB5 BOOST_MOVE_MEMB4 P4 m_p4;
|
||||
#define BOOST_MOVE_MEMB6 BOOST_MOVE_MEMB5 P5 m_p5;
|
||||
#define BOOST_MOVE_MEMB7 BOOST_MOVE_MEMB6 P6 m_p6;
|
||||
#define BOOST_MOVE_MEMB8 BOOST_MOVE_MEMB7 P7 m_p7;
|
||||
#define BOOST_MOVE_MEMB9 BOOST_MOVE_MEMB8 P8 m_p8;
|
||||
|
||||
//BOOST_MOVE_TMPL_LTN
|
||||
#define BOOST_MOVE_TMPL_LT0
|
||||
#define BOOST_MOVE_TMPL_LT1 template<
|
||||
#define BOOST_MOVE_TMPL_LT2 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT3 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT4 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT5 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT6 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT7 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT8 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT9 BOOST_MOVE_TMPL_LT1
|
||||
|
||||
//BOOST_MOVE_LTN
|
||||
#define BOOST_MOVE_LT0
|
||||
#define BOOST_MOVE_LT1 <
|
||||
#define BOOST_MOVE_LT2 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT3 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT4 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT5 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT6 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT7 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT8 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT9 BOOST_MOVE_LT1
|
||||
|
||||
//BOOST_MOVE_GTN
|
||||
#define BOOST_MOVE_GT0
|
||||
#define BOOST_MOVE_GT1 >
|
||||
#define BOOST_MOVE_GT2 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT3 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT4 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT5 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT6 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT7 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT8 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT9 BOOST_MOVE_GT1
|
||||
|
||||
//BOOST_MOVE_LPN
|
||||
#define BOOST_MOVE_LP0
|
||||
#define BOOST_MOVE_LP1 (
|
||||
#define BOOST_MOVE_LP2 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP3 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP4 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP5 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP6 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP7 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP8 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP9 BOOST_MOVE_LP1
|
||||
|
||||
//BOOST_MOVE_RPN
|
||||
#define BOOST_MOVE_RP0
|
||||
#define BOOST_MOVE_RP1 )
|
||||
#define BOOST_MOVE_RP2 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP3 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP4 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP5 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP6 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP7 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP8 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP9 BOOST_MOVE_RP1
|
||||
|
||||
//BOOST_MOVE_IN
|
||||
#define BOOST_MOVE_I0
|
||||
#define BOOST_MOVE_I1 ,
|
||||
#define BOOST_MOVE_I2 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I3 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I4 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I5 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I6 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I7 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I8 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I9 BOOST_MOVE_I1
|
||||
|
||||
//BOOST_MOVE_COLON
|
||||
#define BOOST_MOVE_COLON0
|
||||
#define BOOST_MOVE_COLON1 :
|
||||
#define BOOST_MOVE_COLON2 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON3 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON4 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON5 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON6 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON7 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON8 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON9 BOOST_MOVE_COLON1
|
||||
|
||||
//BOOST_MOVE_ITERATE_2TON
|
||||
#define BOOST_MOVE_ITERATE_2TO2(MACROFUNC) MACROFUNC(2)
|
||||
#define BOOST_MOVE_ITERATE_2TO3(MACROFUNC) BOOST_MOVE_ITERATE_2TO2(MACROFUNC) MACROFUNC(3)
|
||||
#define BOOST_MOVE_ITERATE_2TO4(MACROFUNC) BOOST_MOVE_ITERATE_2TO3(MACROFUNC) MACROFUNC(4)
|
||||
#define BOOST_MOVE_ITERATE_2TO5(MACROFUNC) BOOST_MOVE_ITERATE_2TO4(MACROFUNC) MACROFUNC(5)
|
||||
#define BOOST_MOVE_ITERATE_2TO6(MACROFUNC) BOOST_MOVE_ITERATE_2TO5(MACROFUNC) MACROFUNC(6)
|
||||
#define BOOST_MOVE_ITERATE_2TO7(MACROFUNC) BOOST_MOVE_ITERATE_2TO6(MACROFUNC) MACROFUNC(7)
|
||||
#define BOOST_MOVE_ITERATE_2TO8(MACROFUNC) BOOST_MOVE_ITERATE_2TO7(MACROFUNC) MACROFUNC(8)
|
||||
#define BOOST_MOVE_ITERATE_2TO9(MACROFUNC) BOOST_MOVE_ITERATE_2TO8(MACROFUNC) MACROFUNC(9)
|
||||
|
||||
//BOOST_MOVE_ITERATE_1TON
|
||||
#define BOOST_MOVE_ITERATE_1TO1(MACROFUNC) MACROFUNC(1)
|
||||
#define BOOST_MOVE_ITERATE_1TO2(MACROFUNC) BOOST_MOVE_ITERATE_1TO1(MACROFUNC) MACROFUNC(2)
|
||||
#define BOOST_MOVE_ITERATE_1TO3(MACROFUNC) BOOST_MOVE_ITERATE_1TO2(MACROFUNC) MACROFUNC(3)
|
||||
#define BOOST_MOVE_ITERATE_1TO4(MACROFUNC) BOOST_MOVE_ITERATE_1TO3(MACROFUNC) MACROFUNC(4)
|
||||
#define BOOST_MOVE_ITERATE_1TO5(MACROFUNC) BOOST_MOVE_ITERATE_1TO4(MACROFUNC) MACROFUNC(5)
|
||||
#define BOOST_MOVE_ITERATE_1TO6(MACROFUNC) BOOST_MOVE_ITERATE_1TO5(MACROFUNC) MACROFUNC(6)
|
||||
#define BOOST_MOVE_ITERATE_1TO7(MACROFUNC) BOOST_MOVE_ITERATE_1TO6(MACROFUNC) MACROFUNC(7)
|
||||
#define BOOST_MOVE_ITERATE_1TO8(MACROFUNC) BOOST_MOVE_ITERATE_1TO7(MACROFUNC) MACROFUNC(8)
|
||||
#define BOOST_MOVE_ITERATE_1TO9(MACROFUNC) BOOST_MOVE_ITERATE_1TO8(MACROFUNC) MACROFUNC(9)
|
||||
|
||||
//BOOST_MOVE_ITERATE_0TON
|
||||
#define BOOST_MOVE_ITERATE_0TO0(MACROFUNC) MACROFUNC(0)
|
||||
#define BOOST_MOVE_ITERATE_0TO1(MACROFUNC) BOOST_MOVE_ITERATE_0TO0(MACROFUNC) MACROFUNC(1)
|
||||
#define BOOST_MOVE_ITERATE_0TO2(MACROFUNC) BOOST_MOVE_ITERATE_0TO1(MACROFUNC) MACROFUNC(2)
|
||||
#define BOOST_MOVE_ITERATE_0TO3(MACROFUNC) BOOST_MOVE_ITERATE_0TO2(MACROFUNC) MACROFUNC(3)
|
||||
#define BOOST_MOVE_ITERATE_0TO4(MACROFUNC) BOOST_MOVE_ITERATE_0TO3(MACROFUNC) MACROFUNC(4)
|
||||
#define BOOST_MOVE_ITERATE_0TO5(MACROFUNC) BOOST_MOVE_ITERATE_0TO4(MACROFUNC) MACROFUNC(5)
|
||||
#define BOOST_MOVE_ITERATE_0TO6(MACROFUNC) BOOST_MOVE_ITERATE_0TO5(MACROFUNC) MACROFUNC(6)
|
||||
#define BOOST_MOVE_ITERATE_0TO7(MACROFUNC) BOOST_MOVE_ITERATE_0TO6(MACROFUNC) MACROFUNC(7)
|
||||
#define BOOST_MOVE_ITERATE_0TO8(MACROFUNC) BOOST_MOVE_ITERATE_0TO7(MACROFUNC) MACROFUNC(8)
|
||||
#define BOOST_MOVE_ITERATE_0TO9(MACROFUNC) BOOST_MOVE_ITERATE_0TO8(MACROFUNC) MACROFUNC(9)
|
||||
|
||||
//BOOST_MOVE_ITERATE_NTON
|
||||
#define BOOST_MOVE_ITERATE_0TO0(MACROFUNC) MACROFUNC(0)
|
||||
#define BOOST_MOVE_ITERATE_1TO1(MACROFUNC) MACROFUNC(1)
|
||||
#define BOOST_MOVE_ITERATE_2TO2(MACROFUNC) MACROFUNC(2)
|
||||
#define BOOST_MOVE_ITERATE_3TO3(MACROFUNC) MACROFUNC(3)
|
||||
#define BOOST_MOVE_ITERATE_4TO4(MACROFUNC) MACROFUNC(4)
|
||||
#define BOOST_MOVE_ITERATE_5TO5(MACROFUNC) MACROFUNC(5)
|
||||
#define BOOST_MOVE_ITERATE_6TO6(MACROFUNC) MACROFUNC(6)
|
||||
#define BOOST_MOVE_ITERATE_7TO7(MACROFUNC) MACROFUNC(7)
|
||||
#define BOOST_MOVE_ITERATE_8TO8(MACROFUNC) MACROFUNC(8)
|
||||
#define BOOST_MOVE_ITERATE_9TO9(MACROFUNC) MACROFUNC(9)
|
||||
|
||||
//BOOST_MOVE_CAT
|
||||
#define BOOST_MOVE_CAT(a, b) BOOST_MOVE_CAT_I(a, b)
|
||||
#define BOOST_MOVE_CAT_I(a, b) a ## b
|
||||
//# define BOOST_MOVE_CAT_I(a, b) BOOST_MOVE_CAT_II(~, a ## b)
|
||||
//# define BOOST_MOVE_CAT_II(p, res) res
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_FWD_MACROS_HPP
|
87
miniboost/boost/move/detail/iterator_traits.hpp
Normal file
87
miniboost/boost/move/detail/iterator_traits.hpp
Normal file
|
@ -0,0 +1,87 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/move for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BOOST_MOVE_DETAIL_ITERATOR_TRAITS_HPP
|
||||
#define BOOST_MOVE_DETAIL_ITERATOR_TRAITS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#if defined(__clang__) && defined(_LIBCPP_VERSION)
|
||||
#define BOOST_MOVE_CLANG_INLINE_STD_NS
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wc++11-extensions"
|
||||
#define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
#define BOOST_MOVE_STD_NS_END _LIBCPP_END_NAMESPACE_STD
|
||||
#else
|
||||
#define BOOST_MOVE_STD_NS_BEG namespace std{
|
||||
#define BOOST_MOVE_STD_NS_END }
|
||||
#endif
|
||||
|
||||
BOOST_MOVE_STD_NS_BEG
|
||||
|
||||
struct input_iterator_tag;
|
||||
struct forward_iterator_tag;
|
||||
struct bidirectional_iterator_tag;
|
||||
struct random_access_iterator_tag;
|
||||
struct output_iterator_tag;
|
||||
|
||||
BOOST_MOVE_STD_NS_END
|
||||
|
||||
#ifdef BOOST_MOVE_CLANG_INLINE_STD_NS
|
||||
#pragma GCC diagnostic pop
|
||||
#undef BOOST_MOVE_CLANG_INLINE_STD_NS
|
||||
#endif //BOOST_MOVE_CLANG_INLINE_STD_NS
|
||||
|
||||
namespace boost{ namespace movelib{
|
||||
|
||||
template<class Iterator>
|
||||
struct iterator_traits
|
||||
{
|
||||
typedef typename Iterator::difference_type difference_type;
|
||||
typedef typename Iterator::value_type value_type;
|
||||
typedef typename Iterator::pointer pointer;
|
||||
typedef typename Iterator::reference reference;
|
||||
typedef typename Iterator::iterator_category iterator_category;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct iterator_traits<T*>
|
||||
{
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef T value_type;
|
||||
typedef T* pointer;
|
||||
typedef T& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct iterator_traits<const T*>
|
||||
{
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef T value_type;
|
||||
typedef const T* pointer;
|
||||
typedef const T& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
};
|
||||
|
||||
}} //namespace boost { namespace movelib{
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_ITERATOR_TRAITS_HPP
|
|
@ -1,6 +1,6 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2012-2012.
|
||||
// (C) Copyright Ion Gaztanaga 2012-2015.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
@ -14,7 +14,14 @@
|
|||
#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
|
||||
#define BOOST_MOVE_DETAIL_META_UTILS_HPP
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
#include <boost/move/detail/meta_utils_core.hpp>
|
||||
#include <cstddef> //for std::size_t
|
||||
|
||||
//Small meta-typetraits to support move
|
||||
|
@ -36,78 +43,6 @@ struct nat{};
|
|||
//////////////////////////////////////
|
||||
template <class T> struct natify{};
|
||||
|
||||
//////////////////////////////////////
|
||||
// if_c
|
||||
//////////////////////////////////////
|
||||
template<bool C, typename T1, typename T2>
|
||||
struct if_c
|
||||
{
|
||||
typedef T1 type;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
struct if_c<false,T1,T2>
|
||||
{
|
||||
typedef T2 type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// if_
|
||||
//////////////////////////////////////
|
||||
template<typename T1, typename T2, typename T3>
|
||||
struct if_
|
||||
{
|
||||
typedef typename if_c<0 != T1::value, T2, T3>::type type;
|
||||
};
|
||||
|
||||
//enable_if_
|
||||
template <bool B, class T = nat>
|
||||
struct enable_if_c
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// enable_if_c
|
||||
//////////////////////////////////////
|
||||
template <class T>
|
||||
struct enable_if_c<false, T> {};
|
||||
|
||||
//////////////////////////////////////
|
||||
// enable_if
|
||||
//////////////////////////////////////
|
||||
template <class Cond, class T = nat>
|
||||
struct enable_if : public enable_if_c<Cond::value, T> {};
|
||||
|
||||
//////////////////////////////////////
|
||||
// disable_if
|
||||
//////////////////////////////////////
|
||||
template <class Cond, class T = nat>
|
||||
struct disable_if : public enable_if_c<!Cond::value, T> {};
|
||||
|
||||
//////////////////////////////////////
|
||||
// integral_constant
|
||||
//////////////////////////////////////
|
||||
template<class T, T v>
|
||||
struct integral_constant
|
||||
{
|
||||
static const T value = v;
|
||||
typedef T value_type;
|
||||
typedef integral_constant<T, v> type;
|
||||
};
|
||||
|
||||
typedef integral_constant<bool, true > true_type;
|
||||
typedef integral_constant<bool, false > false_type;
|
||||
|
||||
//////////////////////////////////////
|
||||
// identity
|
||||
//////////////////////////////////////
|
||||
template <class T>
|
||||
struct identity
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// remove_reference
|
||||
//////////////////////////////////////
|
||||
|
@ -184,39 +119,13 @@ struct add_const<T&&>
|
|||
//////////////////////////////////////
|
||||
template<class T>
|
||||
struct add_lvalue_reference
|
||||
{
|
||||
typedef T& type;
|
||||
};
|
||||
{ typedef T& type; };
|
||||
|
||||
template<class T>
|
||||
struct add_lvalue_reference<T&>
|
||||
{
|
||||
typedef T& type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct add_lvalue_reference<void>
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct add_lvalue_reference<const void>
|
||||
{
|
||||
typedef const void type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct add_lvalue_reference<volatile void>
|
||||
{
|
||||
typedef volatile void type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct add_lvalue_reference<const volatile void>
|
||||
{
|
||||
typedef const volatile void type;
|
||||
};
|
||||
template<class T> struct add_lvalue_reference<T&> { typedef T& type; };
|
||||
template<> struct add_lvalue_reference<void> { typedef void type; };
|
||||
template<> struct add_lvalue_reference<const void> { typedef const void type; };
|
||||
template<> struct add_lvalue_reference<volatile void> { typedef volatile void type; };
|
||||
template<> struct add_lvalue_reference<const volatile void>{ typedef const volatile void type; };
|
||||
|
||||
template<class T>
|
||||
struct add_const_lvalue_reference
|
||||
|
@ -227,22 +136,6 @@ struct add_const_lvalue_reference
|
|||
<t_unreferenced_const>::type type;
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_same
|
||||
//////////////////////////////////////
|
||||
template<class T, class U>
|
||||
struct is_same
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_lvalue_reference
|
||||
//////////////////////////////////////
|
||||
|
@ -264,7 +157,7 @@ struct is_lvalue_reference<T&>
|
|||
template<class T>
|
||||
struct is_class_or_union
|
||||
{
|
||||
struct twochar { char _[2]; };
|
||||
struct twochar { char dummy[2]; };
|
||||
template <class U>
|
||||
static char is_class_or_union_tester(void(U::*)(void));
|
||||
template <class U>
|
||||
|
@ -471,6 +364,4 @@ template< class T > struct remove_rvalue_reference { typedef T type; };
|
|||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
|
||||
|
|
118
miniboost/boost/move/detail/meta_utils_core.hpp
Normal file
118
miniboost/boost/move/detail/meta_utils_core.hpp
Normal file
|
@ -0,0 +1,118 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2015-2015.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/move for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP
|
||||
#define BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
//Small meta-typetraits to support move
|
||||
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
//////////////////////////////////////
|
||||
// if_c
|
||||
//////////////////////////////////////
|
||||
template<bool C, typename T1, typename T2>
|
||||
struct if_c
|
||||
{
|
||||
typedef T1 type;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
struct if_c<false,T1,T2>
|
||||
{
|
||||
typedef T2 type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// if_
|
||||
//////////////////////////////////////
|
||||
template<typename T1, typename T2, typename T3>
|
||||
struct if_ : if_c<0 != T1::value, T2, T3>
|
||||
{};
|
||||
|
||||
//enable_if_
|
||||
template <bool B, class T = void>
|
||||
struct enable_if_c
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// enable_if_c
|
||||
//////////////////////////////////////
|
||||
template <class T>
|
||||
struct enable_if_c<false, T> {};
|
||||
|
||||
//////////////////////////////////////
|
||||
// enable_if
|
||||
//////////////////////////////////////
|
||||
template <class Cond, class T = void>
|
||||
struct enable_if : enable_if_c<Cond::value, T> {};
|
||||
|
||||
//////////////////////////////////////
|
||||
// disable_if
|
||||
//////////////////////////////////////
|
||||
template <class Cond, class T = void>
|
||||
struct disable_if : enable_if_c<!Cond::value, T> {};
|
||||
|
||||
//////////////////////////////////////
|
||||
// integral_constant
|
||||
//////////////////////////////////////
|
||||
template<class T, T v>
|
||||
struct integral_constant
|
||||
{
|
||||
static const T value = v;
|
||||
typedef T value_type;
|
||||
typedef integral_constant<T, v> type;
|
||||
};
|
||||
|
||||
typedef integral_constant<bool, true > true_type;
|
||||
typedef integral_constant<bool, false > false_type;
|
||||
|
||||
//////////////////////////////////////
|
||||
// identity
|
||||
//////////////////////////////////////
|
||||
template <class T>
|
||||
struct identity
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_same
|
||||
//////////////////////////////////////
|
||||
template<class T, class U>
|
||||
struct is_same
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP
|
1003
miniboost/boost/move/detail/type_traits.hpp
Normal file
1003
miniboost/boost/move/detail/type_traits.hpp
Normal file
File diff suppressed because it is too large
Load diff
45
miniboost/boost/move/detail/workaround.hpp
Normal file
45
miniboost/boost/move/detail/workaround.hpp
Normal file
|
@ -0,0 +1,45 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/interprocess for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP
|
||||
#define BOOST_MOVE_DETAIL_WORKAROUND_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
#define BOOST_MOVE_PERFECT_FORWARDING
|
||||
#endif
|
||||
|
||||
//Macros for documentation purposes. For code, expands to the argument
|
||||
#define BOOST_MOVE_IMPDEF(TYPE) TYPE
|
||||
#define BOOST_MOVE_SEEDOC(TYPE) TYPE
|
||||
#define BOOST_MOVE_DOC0PTR(TYPE) TYPE
|
||||
#define BOOST_MOVE_DOC1ST(TYPE1, TYPE2) TYPE2
|
||||
#define BOOST_MOVE_I ,
|
||||
#define BOOST_MOVE_DOCIGN(T1) T1
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5) && !defined(__clang__)
|
||||
//Pre-standard rvalue binding rules
|
||||
#define BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
|
||||
#elif defined(_MSC_VER) && (_MSC_VER == 1600)
|
||||
//Standard rvalue binding rules but with some bugs
|
||||
#define BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG
|
||||
#define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG
|
||||
#elif defined(_MSC_VER) && (_MSC_VER == 1700)
|
||||
#define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG
|
||||
#endif
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP
|
|
@ -14,9 +14,17 @@
|
|||
#ifndef BOOST_MOVE_ITERATOR_HPP
|
||||
#define BOOST_MOVE_ITERATOR_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/move/detail/iterator_traits.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <iterator> //std::iterator
|
||||
|
||||
namespace boost {
|
||||
|
||||
|
@ -36,7 +44,7 @@ class move_iterator
|
|||
{
|
||||
public:
|
||||
typedef It iterator_type;
|
||||
typedef typename std::iterator_traits<iterator_type>::value_type value_type;
|
||||
typedef typename boost::movelib::iterator_traits<iterator_type>::value_type value_type;
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_DOXYGEN_INVOKED)
|
||||
typedef value_type && reference;
|
||||
#else
|
||||
|
@ -46,8 +54,8 @@ class move_iterator
|
|||
, value_type & >::type reference;
|
||||
#endif
|
||||
typedef It pointer;
|
||||
typedef typename std::iterator_traits<iterator_type>::difference_type difference_type;
|
||||
typedef typename std::iterator_traits<iterator_type>::iterator_category iterator_category;
|
||||
typedef typename boost::movelib::iterator_traits<iterator_type>::difference_type difference_type;
|
||||
typedef typename boost::movelib::iterator_traits<iterator_type>::iterator_category iterator_category;
|
||||
|
||||
move_iterator()
|
||||
{}
|
||||
|
|
|
@ -17,6 +17,14 @@
|
|||
#ifndef BOOST_MOVE_MOVE_HPP
|
||||
#define BOOST_MOVE_MOVE_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/move/utility.hpp>
|
||||
#include <boost/move/iterator.hpp>
|
||||
|
|
|
@ -11,19 +11,24 @@
|
|||
|
||||
//! \file
|
||||
|
||||
#ifndef BOOST_MOVE_MOVE_TRAITS_HPP
|
||||
#define BOOST_MOVE_MOVE_TRAITS_HPP
|
||||
#ifndef BOOST_MOVE_TRAITS_HPP
|
||||
#define BOOST_MOVE_TRAITS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/type_traits/has_trivial_destructor.hpp>
|
||||
#include <boost/type_traits/is_nothrow_move_constructible.hpp>
|
||||
#include <boost/type_traits/is_nothrow_move_assignable.hpp>
|
||||
#include <boost/type_traits/is_copy_constructible.hpp>
|
||||
#include <boost/move/detail/meta_utils.hpp>
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#include <boost/move/core.hpp>
|
||||
#endif
|
||||
#include <boost/move/detail/meta_utils.hpp>
|
||||
#include <boost/move/detail/type_traits.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
|
@ -38,7 +43,7 @@ namespace boost {
|
|||
//! when inserted in containers.
|
||||
template <class T>
|
||||
struct has_trivial_destructor_after_move
|
||||
: ::boost::has_trivial_destructor<T>
|
||||
: ::boost::move_detail::is_trivially_destructible<T>
|
||||
{};
|
||||
|
||||
//! By default this traits returns
|
||||
|
@ -48,8 +53,8 @@ struct has_trivial_destructor_after_move
|
|||
template <class T>
|
||||
struct has_nothrow_move
|
||||
{
|
||||
static const bool value = boost::is_nothrow_move_constructible<T>::value &&
|
||||
boost::is_nothrow_move_assignable<T>::value;
|
||||
static const bool value = boost::move_detail::is_nothrow_move_constructible<T>::value &&
|
||||
boost::move_detail::is_nothrow_move_assignable<T>::value;
|
||||
};
|
||||
|
||||
namespace move_detail {
|
||||
|
@ -59,9 +64,9 @@ struct is_nothrow_move_constructible_or_uncopyable
|
|||
{
|
||||
//The standard requires is_nothrow_move_constructible for move_if_noexcept
|
||||
//but a user (usually in C++03) might specialize has_nothrow_move which includes it
|
||||
static const bool value = boost::is_nothrow_move_constructible<T>::value ||
|
||||
static const bool value = is_nothrow_move_constructible<T>::value ||
|
||||
has_nothrow_move<T>::value ||
|
||||
!boost::is_copy_constructible<T>::value;
|
||||
!is_copy_constructible<T>::value;
|
||||
};
|
||||
|
||||
} //move_detail {
|
||||
|
@ -69,4 +74,4 @@ struct is_nothrow_move_constructible_or_uncopyable
|
|||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_MOVE_TRAITS_HPP
|
||||
#endif //#ifndef BOOST_MOVE_TRAITS_HPP
|
||||
|
|
|
@ -16,6 +16,14 @@
|
|||
#ifndef BOOST_MOVE_MOVE_UTILITY_HPP
|
||||
#define BOOST_MOVE_MOVE_UTILITY_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/move/traits.hpp>
|
||||
|
|
|
@ -17,6 +17,14 @@
|
|||
#ifndef BOOST_MOVE_MOVE_UTILITY_CORE_HPP
|
||||
#define BOOST_MOVE_MOVE_UTILITY_CORE_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/move/core.hpp>
|
||||
#include <boost/move/detail/meta_utils.hpp>
|
||||
|
@ -273,14 +281,6 @@
|
|||
namespace boost{
|
||||
namespace move_detail{
|
||||
|
||||
template<class T>
|
||||
void swap(T &a, T &b)
|
||||
{
|
||||
T c((::boost::move(a)));
|
||||
a = ::boost::move(b);
|
||||
b = ::boost::move(c);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
typename boost::move_detail::add_rvalue_reference<T>::type declval();
|
||||
|
||||
|
|
|
@ -15,9 +15,16 @@
|
|||
// $Revision$
|
||||
|
||||
#include <boost/preprocessor/seq/subseq.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat.hpp>
|
||||
#include <boost/preprocessor/arithmetic/add.hpp>
|
||||
|
||||
#define BOOST_MPL_PP_RANGE_ITEM(z,n,_) (n)
|
||||
|
||||
#define BOOST_MPL_PP_RANGE(first, length) \
|
||||
BOOST_PP_SEQ_SUBSEQ((0)(1)(2)(3)(4)(5)(6)(7)(8)(9), first, length) \
|
||||
BOOST_PP_SEQ_SUBSEQ( \
|
||||
BOOST_PP_REPEAT(BOOST_PP_ADD(first,length), BOOST_MPL_PP_RANGE_ITEM, _), \
|
||||
first, length \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#endif // BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright 2003-2013 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2003-2014 Joaquin M Lopez Munoz.
|
||||
* 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)
|
||||
|
@ -41,6 +41,7 @@ class bidir_node_iterator:
|
|||
const typename Node::value_type&>
|
||||
{
|
||||
public:
|
||||
/* coverity[uninit_ctor]: suppress warning */
|
||||
bidir_node_iterator(){}
|
||||
explicit bidir_node_iterator(Node* node_):node(node_){}
|
||||
|
||||
|
|
135
miniboost/boost/multi_index/detail/is_transparent.hpp
Normal file
135
miniboost/boost/multi_index/detail/is_transparent.hpp
Normal file
|
@ -0,0 +1,135 @@
|
|||
/* Copyright 2003-2014 Joaquin M Lopez Munoz.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* See http://www.boost.org/libs/multi_index for library home page.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_MULTI_INDEX_DETAIL_IS_TRANSPARENT_HPP
|
||||
#define BOOST_MULTI_INDEX_DETAIL_IS_TRANSPARENT_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/type_traits/intrinsics.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace multi_index{
|
||||
|
||||
namespace detail{
|
||||
|
||||
/* Metafunction that checks if f(arg,arg2) executes without argument type
|
||||
* conversion. By default (i.e. when it cannot be determined) it evaluates to
|
||||
* true.
|
||||
*/
|
||||
|
||||
template<typename F,typename Arg1,typename Arg2,typename=void>
|
||||
struct is_transparent:mpl::true_{};
|
||||
|
||||
} /* namespace multi_index::detail */
|
||||
|
||||
} /* namespace multi_index */
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
#if !defined(BOOST_NO_SFINAE)&&!defined(BOOST_NO_SFINAE_EXPR)&& \
|
||||
!defined(BOOST_NO_CXX11_DECLTYPE)&& \
|
||||
(defined(BOOST_NO_CXX11_FINAL)||defined(BOOST_IS_FINAL))
|
||||
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/mpl/or.hpp>
|
||||
#include <boost/type_traits/function_traits.hpp>
|
||||
#include <boost/type_traits/is_class.hpp>
|
||||
#include <boost/type_traits/is_final.hpp>
|
||||
#include <boost/type_traits/is_function.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/remove_pointer.hpp>
|
||||
#include <boost/utility/declval.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace multi_index{
|
||||
|
||||
namespace detail{
|
||||
|
||||
struct not_is_transparent_result_type{};
|
||||
|
||||
template<typename F,typename Arg1,typename Arg2>
|
||||
struct is_transparent_class_helper:F
|
||||
{
|
||||
using F::operator();
|
||||
template<typename T,typename Q>
|
||||
not_is_transparent_result_type operator()(const T&,const Q&)const;
|
||||
};
|
||||
|
||||
template<typename F,typename Arg1,typename Arg2,typename=void>
|
||||
struct is_transparent_class:mpl::true_{};
|
||||
|
||||
template<typename F,typename Arg1,typename Arg2>
|
||||
struct is_transparent_class<
|
||||
F,Arg1,Arg2,
|
||||
typename enable_if<
|
||||
is_same<
|
||||
decltype(
|
||||
declval<const is_transparent_class_helper<F,Arg1,Arg2> >()(
|
||||
declval<const Arg1&>(),declval<const Arg2&>())
|
||||
),
|
||||
not_is_transparent_result_type
|
||||
>
|
||||
>::type
|
||||
>:mpl::false_{};
|
||||
|
||||
template<typename F,typename Arg1,typename Arg2>
|
||||
struct is_transparent<
|
||||
F,Arg1,Arg2,
|
||||
typename enable_if<
|
||||
mpl::and_<
|
||||
is_class<F>,
|
||||
mpl::not_<is_final<F> > /* is_transparent_class_helper derives from F */
|
||||
>
|
||||
>::type
|
||||
>:is_transparent_class<F,Arg1,Arg2>{};
|
||||
|
||||
template<typename F,typename Arg1,typename Arg2,typename=void>
|
||||
struct is_transparent_function:mpl::true_{};
|
||||
|
||||
template<typename F,typename Arg1,typename Arg2>
|
||||
struct is_transparent_function<
|
||||
F,Arg1,Arg2,
|
||||
typename enable_if<
|
||||
mpl::or_<
|
||||
mpl::not_<mpl::or_<
|
||||
is_same<typename function_traits<F>::arg1_type,const Arg1&>,
|
||||
is_same<typename function_traits<F>::arg1_type,Arg1>
|
||||
> >,
|
||||
mpl::not_<mpl::or_<
|
||||
is_same<typename function_traits<F>::arg2_type,const Arg2&>,
|
||||
is_same<typename function_traits<F>::arg2_type,Arg2>
|
||||
> >
|
||||
>
|
||||
>::type
|
||||
>:mpl::false_{};
|
||||
|
||||
template<typename F,typename Arg1,typename Arg2>
|
||||
struct is_transparent<
|
||||
F,Arg1,Arg2,
|
||||
typename enable_if<
|
||||
is_function<typename remove_pointer<F>::type>
|
||||
>::type
|
||||
>:is_transparent_function<typename remove_pointer<F>::type,Arg1,Arg2>{};
|
||||
|
||||
} /* namespace multi_index::detail */
|
||||
|
||||
} /* namespace multi_index */
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright 2003-2013 Joaquin M Lopez Munoz.
|
||||
/* Copyright 2003-2014 Joaquin M Lopez Munoz.
|
||||
* 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)
|
||||
|
@ -41,6 +41,8 @@
|
|||
#endif
|
||||
|
||||
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/multi_index/detail/promotes_arg.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace boost{
|
||||
|
@ -51,6 +53,9 @@ namespace detail{
|
|||
|
||||
/* Common code for index memfuns having templatized and
|
||||
* non-templatized versions.
|
||||
* Implementation note: When CompatibleKey is consistently promoted to
|
||||
* KeyFromValue::result_type for comparison, the promotion is made once in
|
||||
* advance to increase efficiency.
|
||||
*/
|
||||
|
||||
template<
|
||||
|
@ -60,6 +65,35 @@ template<
|
|||
inline Node* ordered_index_find(
|
||||
Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
|
||||
const CompatibleCompare& comp)
|
||||
{
|
||||
typedef typename KeyFromValue::result_type key_type;
|
||||
|
||||
return ordered_index_find(
|
||||
top,y,key,x,comp,
|
||||
mpl::and_<
|
||||
promotes_1st_arg<CompatibleCompare,CompatibleKey,key_type>,
|
||||
promotes_2nd_arg<CompatibleCompare,key_type,CompatibleKey> >());
|
||||
}
|
||||
|
||||
template<
|
||||
typename Node,typename KeyFromValue,
|
||||
typename CompatibleCompare
|
||||
>
|
||||
inline Node* ordered_index_find(
|
||||
Node* top,Node* y,const KeyFromValue& key,
|
||||
const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
|
||||
const CompatibleCompare& comp,mpl::true_)
|
||||
{
|
||||
return ordered_index_find(top,y,key,x,comp,mpl::false_());
|
||||
}
|
||||
|
||||
template<
|
||||
typename Node,typename KeyFromValue,
|
||||
typename CompatibleKey,typename CompatibleCompare
|
||||
>
|
||||
inline Node* ordered_index_find(
|
||||
Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
|
||||
const CompatibleCompare& comp,mpl::false_)
|
||||
{
|
||||
Node* y0=y;
|
||||
|
||||
|
@ -81,6 +115,33 @@ template<
|
|||
inline Node* ordered_index_lower_bound(
|
||||
Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
|
||||
const CompatibleCompare& comp)
|
||||
{
|
||||
typedef typename KeyFromValue::result_type key_type;
|
||||
|
||||
return ordered_index_lower_bound(
|
||||
top,y,key,x,comp,
|
||||
promotes_2nd_arg<CompatibleCompare,key_type,CompatibleKey>());
|
||||
}
|
||||
|
||||
template<
|
||||
typename Node,typename KeyFromValue,
|
||||
typename CompatibleCompare
|
||||
>
|
||||
inline Node* ordered_index_lower_bound(
|
||||
Node* top,Node* y,const KeyFromValue& key,
|
||||
const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
|
||||
const CompatibleCompare& comp,mpl::true_)
|
||||
{
|
||||
return ordered_index_lower_bound(top,y,key,x,comp,mpl::false_());
|
||||
}
|
||||
|
||||
template<
|
||||
typename Node,typename KeyFromValue,
|
||||
typename CompatibleKey,typename CompatibleCompare
|
||||
>
|
||||
inline Node* ordered_index_lower_bound(
|
||||
Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
|
||||
const CompatibleCompare& comp,mpl::false_)
|
||||
{
|
||||
while(top){
|
||||
if(!comp(key(top->value()),x)){
|
||||
|
@ -100,6 +161,33 @@ template<
|
|||
inline Node* ordered_index_upper_bound(
|
||||
Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
|
||||
const CompatibleCompare& comp)
|
||||
{
|
||||
typedef typename KeyFromValue::result_type key_type;
|
||||
|
||||
return ordered_index_upper_bound(
|
||||
top,y,key,x,comp,
|
||||
promotes_1st_arg<CompatibleCompare,CompatibleKey,key_type>());
|
||||
}
|
||||
|
||||
template<
|
||||
typename Node,typename KeyFromValue,
|
||||
typename CompatibleCompare
|
||||
>
|
||||
inline Node* ordered_index_upper_bound(
|
||||
Node* top,Node* y,const KeyFromValue& key,
|
||||
const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
|
||||
const CompatibleCompare& comp,mpl::true_)
|
||||
{
|
||||
return ordered_index_upper_bound(top,y,key,x,comp,mpl::false_());
|
||||
}
|
||||
|
||||
template<
|
||||
typename Node,typename KeyFromValue,
|
||||
typename CompatibleKey,typename CompatibleCompare
|
||||
>
|
||||
inline Node* ordered_index_upper_bound(
|
||||
Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
|
||||
const CompatibleCompare& comp,mpl::false_)
|
||||
{
|
||||
while(top){
|
||||
if(comp(x,key(top->value()))){
|
||||
|
@ -119,6 +207,35 @@ template<
|
|||
inline std::pair<Node*,Node*> ordered_index_equal_range(
|
||||
Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
|
||||
const CompatibleCompare& comp)
|
||||
{
|
||||
typedef typename KeyFromValue::result_type key_type;
|
||||
|
||||
return ordered_index_equal_range(
|
||||
top,y,key,x,comp,
|
||||
mpl::and_<
|
||||
promotes_1st_arg<CompatibleCompare,CompatibleKey,key_type>,
|
||||
promotes_2nd_arg<CompatibleCompare,key_type,CompatibleKey> >());
|
||||
}
|
||||
|
||||
template<
|
||||
typename Node,typename KeyFromValue,
|
||||
typename CompatibleCompare
|
||||
>
|
||||
inline std::pair<Node*,Node*> ordered_index_equal_range(
|
||||
Node* top,Node* y,const KeyFromValue& key,
|
||||
const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
|
||||
const CompatibleCompare& comp,mpl::true_)
|
||||
{
|
||||
return ordered_index_equal_range(top,y,key,x,comp,mpl::false_());
|
||||
}
|
||||
|
||||
template<
|
||||
typename Node,typename KeyFromValue,
|
||||
typename CompatibleKey,typename CompatibleCompare
|
||||
>
|
||||
inline std::pair<Node*,Node*> ordered_index_equal_range(
|
||||
Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
|
||||
const CompatibleCompare& comp,mpl::false_)
|
||||
{
|
||||
while(top){
|
||||
if(comp(key(top->value()),x)){
|
||||
|
@ -130,8 +247,10 @@ inline std::pair<Node*,Node*> ordered_index_equal_range(
|
|||
}
|
||||
else{
|
||||
return std::pair<Node*,Node*>(
|
||||
ordered_index_lower_bound(Node::from_impl(top->left()),top,key,x,comp),
|
||||
ordered_index_upper_bound(Node::from_impl(top->right()),y,key,x,comp));
|
||||
ordered_index_lower_bound(
|
||||
Node::from_impl(top->left()),top,key,x,comp,mpl::false_()),
|
||||
ordered_index_upper_bound(
|
||||
Node::from_impl(top->right()),y,key,x,comp,mpl::false_()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
83
miniboost/boost/multi_index/detail/promotes_arg.hpp
Normal file
83
miniboost/boost/multi_index/detail/promotes_arg.hpp
Normal file
|
@ -0,0 +1,83 @@
|
|||
/* Copyright 2003-2014 Joaquin M Lopez Munoz.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* See http://www.boost.org/libs/multi_index for library home page.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_MULTI_INDEX_DETAIL_PROMOTES_ARG_HPP
|
||||
#define BOOST_MULTI_INDEX_DETAIL_PROMOTES_ARG_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/type_traits/intrinsics.hpp>
|
||||
|
||||
/* Metafunctions to check if f(arg1,arg2) promotes either arg1 to the type of
|
||||
* arg2 or viceversa. By default, (i.e. if it cannot be determined), no
|
||||
* promotion is assumed.
|
||||
*/
|
||||
|
||||
#if !defined(BOOST_IS_CONVERTIBLE)
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace multi_index{
|
||||
|
||||
namespace detail{
|
||||
|
||||
template<typename F,typename Arg1,typename Arg2>
|
||||
struct promotes_1st_arg:mpl::false_{};
|
||||
|
||||
template<typename F,typename Arg1,typename Arg2>
|
||||
struct promotes_2nd_arg:mpl::false_{};
|
||||
|
||||
} /* namespace multi_index::detail */
|
||||
|
||||
} /* namespace multi_index */
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
#else
|
||||
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/multi_index/detail/is_transparent.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace multi_index{
|
||||
|
||||
namespace detail{
|
||||
|
||||
template<typename F,typename Arg1,typename Arg2>
|
||||
struct promotes_1st_arg:
|
||||
mpl::and_<
|
||||
mpl::not_<is_transparent<F,Arg1,Arg2> >,
|
||||
is_convertible<const Arg1,Arg2>,
|
||||
is_transparent<F,Arg2,Arg2>
|
||||
>
|
||||
{};
|
||||
|
||||
template<typename F,typename Arg1,typename Arg2>
|
||||
struct promotes_2nd_arg:
|
||||
mpl::and_<
|
||||
mpl::not_<is_transparent<F,Arg1,Arg2> >,
|
||||
is_convertible<const Arg2,Arg1>,
|
||||
is_transparent<F,Arg1,Arg1>
|
||||
>
|
||||
{};
|
||||
|
||||
} /* namespace multi_index::detail */
|
||||
|
||||
} /* namespace multi_index */
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
#endif /* defined(BOOST_IS_CONVERTIBLE) */
|
||||
#endif
|
|
@ -987,6 +987,7 @@ private:
|
|||
|
||||
struct link_info
|
||||
{
|
||||
/* coverity[uninit_ctor]: suppress warning */
|
||||
link_info():side(to_left){}
|
||||
|
||||
ordered_index_side side;
|
||||
|
|
|
@ -48,10 +48,23 @@ Version number available as major, minor, and patch.
|
|||
# error "Cannot determine build number from _MSC_FULL_VER"
|
||||
# endif
|
||||
# endif
|
||||
# define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\
|
||||
_MSC_VER/100-6,\
|
||||
_MSC_VER%100,\
|
||||
BOOST_COMP_MSVC_BUILD)
|
||||
/*
|
||||
VS2014 was skipped in the release sequence for MS. Which
|
||||
means that the compiler and VS product versions are no longer
|
||||
in sync. Hence we need to use different formulas for
|
||||
mapping from MSC version to VS product version.
|
||||
*/
|
||||
# if (_MSC_VER >= 1900)
|
||||
# define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\
|
||||
_MSC_VER/100-5,\
|
||||
_MSC_VER%100,\
|
||||
BOOST_COMP_MSVC_BUILD)
|
||||
# else
|
||||
# define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\
|
||||
_MSC_VER/100-6,\
|
||||
_MSC_VER%100,\
|
||||
BOOST_COMP_MSVC_BUILD)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_COMP_MSVC_DETECTION
|
||||
|
|
|
@ -42,6 +42,8 @@ Macros are:
|
|||
#define BOOST_PREDEF_MAKE_0X_VVRRP(V) BOOST_VERSION_NUMBER((V&0xFF000)>>12,(V&0xFF0)>>4,(V&0xF))
|
||||
/*` `BOOST_PREDEF_MAKE_0X_VRRPP000(V)` */
|
||||
#define BOOST_PREDEF_MAKE_0X_VRRPP000(V) BOOST_VERSION_NUMBER((V&0xF0000000)>>28,(V&0xFF00000)>>20,(V&0xFF000)>>12)
|
||||
/*` `BOOST_PREDEF_MAKE_0X_VVRRPP(V)` */
|
||||
#define BOOST_PREDEF_MAKE_0X_VVRRPP(V) BOOST_VERSION_NUMBER((V&0xFF0000)>>16,(V&0xFF00)>>8,(V&0xFF))
|
||||
/*` `BOOST_PREDEF_MAKE_10_VPPP(V)` */
|
||||
#define BOOST_PREDEF_MAKE_10_VPPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,0,(V)%1000)
|
||||
/*` `BOOST_PREDEF_MAKE_10_VRP(V)` */
|
||||
|
|
|
@ -15,6 +15,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
|||
#include <boost/predef/os/beos.h>
|
||||
#include <boost/predef/os/bsd.h>
|
||||
#include <boost/predef/os/cygwin.h>
|
||||
#include <boost/predef/os/haiku.h>
|
||||
#include <boost/predef/os/hpux.h>
|
||||
#include <boost/predef/os/irix.h>
|
||||
#include <boost/predef/os/ios.h>
|
||||
|
|
47
miniboost/boost/predef/os/haiku.h
Normal file
47
miniboost/boost/predef/os/haiku.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
Copyright Jessica Hamilton 2014
|
||||
Copyright Rene Rivera 2014
|
||||
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_PREDEF_OS_HAIKU_H
|
||||
#define BOOST_PREDEF_OS_HAIKU_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_OS_HAIKU`]
|
||||
|
||||
[@http://en.wikipedia.org/wiki/Haiku_(operating_system) Haiku] operating system.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__HAIKU__`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_OS_HAIKU BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
|
||||
defined(__HAIKU__) \
|
||||
)
|
||||
# undef BOOST_OS_HAIKU
|
||||
# define BOOST_OS_HAIKU BOOST_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if BOOST_OS_HAIKU
|
||||
# define BOOST_OS_HAIKU_AVAILABLE
|
||||
# include <boost/predef/detail/os_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_OS_HAIKU_NAME "Haiku"
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_OS_HAIKU,BOOST_OS_HAIKU_NAME)
|
||||
|
||||
|
||||
#endif
|
|
@ -13,6 +13,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
|||
#include <boost/predef/library/c/gnu.h>
|
||||
#include <boost/predef/os/macos.h>
|
||||
#include <boost/predef/os/bsd.h>
|
||||
#include <boost/predef/os/android.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_ENDIAN_*`]
|
||||
|
@ -53,7 +54,7 @@ information and acquired knowledge:
|
|||
*/
|
||||
#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \
|
||||
!BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD
|
||||
# if BOOST_LIB_C_GNU
|
||||
# if BOOST_LIB_C_GNU || BOOST_OS_ANDROID
|
||||
# include <endian.h>
|
||||
# else
|
||||
# if BOOST_OS_MACOS
|
||||
|
@ -69,29 +70,29 @@ information and acquired knowledge:
|
|||
# endif
|
||||
# endif
|
||||
# if defined(__BYTE_ORDER)
|
||||
# if (__BYTE_ORDER == __BIG_ENDIAN)
|
||||
# if defined(__BIG_ENDIAN) && (__BYTE_ORDER == __BIG_ENDIAN)
|
||||
# undef BOOST_ENDIAN_BIG_BYTE
|
||||
# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
# if (__BYTE_ORDER == __LITTLE_ENDIAN)
|
||||
# if defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == __LITTLE_ENDIAN)
|
||||
# undef BOOST_ENDIAN_LITTLE_BYTE
|
||||
# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
# if (__BYTE_ORDER == __PDP_ENDIAN)
|
||||
# if defined(__PDP_ENDIAN) && (__BYTE_ORDER == __PDP_ENDIAN)
|
||||
# undef BOOST_ENDIAN_LITTLE_WORD
|
||||
# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
# endif
|
||||
# if !defined(__BYTE_ORDER) && defined(_BYTE_ORDER)
|
||||
# if (_BYTE_ORDER == _BIG_ENDIAN)
|
||||
# if defined(_BIG_ENDIAN) && (_BYTE_ORDER == _BIG_ENDIAN)
|
||||
# undef BOOST_ENDIAN_BIG_BYTE
|
||||
# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
# if (_BYTE_ORDER == _LITTLE_ENDIAN)
|
||||
# if defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN)
|
||||
# undef BOOST_ENDIAN_LITTLE_BYTE
|
||||
# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
# if (_BYTE_ORDER == _PDP_ENDIAN)
|
||||
# if defined(_PDP_ENDIAN) && (_BYTE_ORDER == _PDP_ENDIAN)
|
||||
# undef BOOST_ENDIAN_LITTLE_WORD
|
||||
# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
# elif defined(__MWERKS__) && __MWERKS__ >= 0x3200
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
|
||||
# elif defined(__EDG__) || defined(__EDG_VERSION__)
|
||||
# if defined(_MSC_VER) && __EDG_VERSION__ >= 308
|
||||
# if defined(_MSC_VER) && (defined(__INTELLISENSE__) || __EDG_VERSION__ >= 308)
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC())
|
||||
# else
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT())
|
||||
|
@ -75,7 +75,7 @@
|
|||
# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI
|
||||
# define BOOST_PP_VARIADICS 0
|
||||
# /* VC++ (C/C++) */
|
||||
# elif defined _MSC_VER && _MSC_VER >= 1400 && !defined __EDG__ && !defined __clang__
|
||||
# elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__)) && !defined __clang__
|
||||
# define BOOST_PP_VARIADICS 1
|
||||
# define BOOST_PP_VARIADICS_MSVC 1
|
||||
# /* Wave (C/C++), GCC (C++) */
|
||||
|
@ -90,7 +90,7 @@
|
|||
# elif !BOOST_PP_VARIADICS + 1 < 2
|
||||
# undef BOOST_PP_VARIADICS
|
||||
# define BOOST_PP_VARIADICS 1
|
||||
# if defined _MSC_VER && _MSC_VER >= 1400 && !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)
|
||||
# if defined _MSC_VER && _MSC_VER >= 1400 && (defined(__INTELLISENSE__) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI))
|
||||
# define BOOST_PP_VARIADICS_MSVC 1
|
||||
# endif
|
||||
# else
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#
|
||||
# else
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/facilities/identity.hpp>
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * Distributed under the Boost Software License, Version 1.0. (See
|
||||
# * accompanying file LICENSE_1_0.txt or copy at
|
||||
# * http://www.boost.org/LICENSE_1_0.txt)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_PUNCTUATION_PAREN_HPP
|
||||
# define BOOST_PREPROCESSOR_PUNCTUATION_PAREN_HPP
|
||||
#
|
||||
# /* BOOST_PP_LPAREN */
|
||||
#
|
||||
# define BOOST_PP_LPAREN() (
|
||||
#
|
||||
# /* BOOST_PP_RPAREN */
|
||||
#
|
||||
# define BOOST_PP_RPAREN() )
|
||||
#
|
||||
# endif
|
|
@ -1,38 +0,0 @@
|
|||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * Distributed under the Boost Software License, Version 1.0. (See
|
||||
# * accompanying file LICENSE_1_0.txt or copy at
|
||||
# * http://www.boost.org/LICENSE_1_0.txt)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_PUNCTUATION_PAREN_IF_HPP
|
||||
# define BOOST_PREPROCESSOR_PUNCTUATION_PAREN_IF_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/facilities/empty.hpp>
|
||||
# include <boost/preprocessor/punctuation/paren.hpp>
|
||||
#
|
||||
# /* BOOST_PP_LPAREN_IF */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_LPAREN_IF(cond) BOOST_PP_IF(cond, BOOST_PP_LPAREN, BOOST_PP_EMPTY)()
|
||||
# else
|
||||
# define BOOST_PP_LPAREN_IF(cond) BOOST_PP_LPAREN_IF_I(cond)
|
||||
# define BOOST_PP_LPAREN_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_LPAREN, BOOST_PP_EMPTY)()
|
||||
# endif
|
||||
#
|
||||
# /* BOOST_PP_RPAREN_IF */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_RPAREN_IF(cond) BOOST_PP_IF(cond, BOOST_PP_RPAREN, BOOST_PP_EMPTY)()
|
||||
# else
|
||||
# define BOOST_PP_RPAREN_IF(cond) BOOST_PP_RPAREN_IF_I(cond)
|
||||
# define BOOST_PP_RPAREN_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_RPAREN, BOOST_PP_EMPTY)()
|
||||
# endif
|
||||
#
|
||||
# endif
|
|
@ -1,63 +0,0 @@
|
|||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * Distributed under the Boost Software License, Version 1.0. (See
|
||||
# * accompanying file LICENSE_1_0.txt or copy at
|
||||
# * http://www.boost.org/LICENSE_1_0.txt)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_HPP
|
||||
# define BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_HPP
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/debug/error.hpp>
|
||||
# include <boost/preprocessor/detail/auto_rec.hpp>
|
||||
# include <boost/preprocessor/repetition/repeat.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ENUM_TRAILING */
|
||||
#
|
||||
# if 0
|
||||
# define BOOST_PP_ENUM_TRAILING(count, macro, data)
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_ENUM_TRAILING BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4))
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_ENUM_TRAILING_1(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_TRAILING_M_1, (m, d))
|
||||
# define BOOST_PP_ENUM_TRAILING_2(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_TRAILING_M_2, (m, d))
|
||||
# define BOOST_PP_ENUM_TRAILING_3(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_TRAILING_M_3, (m, d))
|
||||
# else
|
||||
# define BOOST_PP_ENUM_TRAILING_1(c, m, d) BOOST_PP_ENUM_TRAILING_1_I(c, m, d)
|
||||
# define BOOST_PP_ENUM_TRAILING_2(c, m, d) BOOST_PP_ENUM_TRAILING_2_I(c, m, d)
|
||||
# define BOOST_PP_ENUM_TRAILING_3(c, m, d) BOOST_PP_ENUM_TRAILING_3_I(c, m, d)
|
||||
# define BOOST_PP_ENUM_TRAILING_1_I(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_TRAILING_M_1, (m, d))
|
||||
# define BOOST_PP_ENUM_TRAILING_2_I(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_TRAILING_M_2, (m, d))
|
||||
# define BOOST_PP_ENUM_TRAILING_3_I(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_TRAILING_M_3, (m, d))
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_ENUM_TRAILING_4(c, m, d) BOOST_PP_ERROR(0x0003)
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
||||
# define BOOST_PP_ENUM_TRAILING_M_1(z, n, md) BOOST_PP_ENUM_TRAILING_M_1_IM(z, n, BOOST_PP_TUPLE_REM_2 md)
|
||||
# define BOOST_PP_ENUM_TRAILING_M_2(z, n, md) BOOST_PP_ENUM_TRAILING_M_2_IM(z, n, BOOST_PP_TUPLE_REM_2 md)
|
||||
# define BOOST_PP_ENUM_TRAILING_M_3(z, n, md) BOOST_PP_ENUM_TRAILING_M_3_IM(z, n, BOOST_PP_TUPLE_REM_2 md)
|
||||
# define BOOST_PP_ENUM_TRAILING_M_1_IM(z, n, im) BOOST_PP_ENUM_TRAILING_M_1_I(z, n, im)
|
||||
# define BOOST_PP_ENUM_TRAILING_M_2_IM(z, n, im) BOOST_PP_ENUM_TRAILING_M_2_I(z, n, im)
|
||||
# define BOOST_PP_ENUM_TRAILING_M_3_IM(z, n, im) BOOST_PP_ENUM_TRAILING_M_3_I(z, n, im)
|
||||
# else
|
||||
# define BOOST_PP_ENUM_TRAILING_M_1(z, n, md) BOOST_PP_ENUM_TRAILING_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md))
|
||||
# define BOOST_PP_ENUM_TRAILING_M_2(z, n, md) BOOST_PP_ENUM_TRAILING_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md))
|
||||
# define BOOST_PP_ENUM_TRAILING_M_3(z, n, md) BOOST_PP_ENUM_TRAILING_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md))
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_ENUM_TRAILING_M_1_I(z, n, m, d) , m(z, n, d)
|
||||
# define BOOST_PP_ENUM_TRAILING_M_2_I(z, n, m, d) , m(z, n, d)
|
||||
# define BOOST_PP_ENUM_TRAILING_M_3_I(z, n, m, d) , m(z, n, d)
|
||||
#
|
||||
# endif
|
|
@ -27,14 +27,14 @@
|
|||
# if BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__))
|
||||
# define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args)
|
||||
# define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(BOOST_PP_EXPAND(m ## args),)
|
||||
# define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
/*
|
||||
Use BOOST_PP_REM_CAT if it is a single element tuple ( which might be empty )
|
||||
else use BOOST_PP_REM. This fixes a VC++ problem with an empty tuple and BOOST_PP_TUPLE_ELEM
|
||||
functionality. See tuple_elem_bug_test.cxx.
|
||||
*/
|
||||
# define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) \
|
||||
BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple) \
|
||||
BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_EXPAND(BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple)) \
|
||||
/**/
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__)(__VA_ARGS__)
|
||||
|
|
|
@ -123,8 +123,8 @@
|
|||
# if BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__), (__VA_ARGS__))
|
||||
# define BOOST_PP_TUPLE_REM_CTOR_I(m, args) BOOST_PP_TUPLE_REM_CTOR_II(m, args)
|
||||
# define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(BOOST_PP_EXPAND(m ## args),)
|
||||
# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple
|
||||
# define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_EXPAND(BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple)
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__)(__VA_ARGS__)
|
||||
# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_REM tuple
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( BOOST_NO_SFINAE )
|
||||
# define BOOST_SP_NO_SP_CONVERTIBLE
|
||||
|
|
|
@ -20,6 +20,12 @@
|
|||
#include <boost/config.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_has_sync.hpp>
|
||||
|
||||
#if defined( __clang__ ) && defined( __has_extension )
|
||||
# if __has_extension( __c_atomic__ )
|
||||
# define BOOST_SP_HAS_CLANG_C11_ATOMICS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined( BOOST_SP_DISABLE_THREADS )
|
||||
# include <boost/smart_ptr/detail/sp_counted_base_nt.hpp>
|
||||
|
||||
|
@ -35,6 +41,9 @@
|
|||
#elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 )
|
||||
# include <boost/smart_ptr/detail/sp_counted_base_nt.hpp>
|
||||
|
||||
#elif defined( BOOST_SP_HAS_CLANG_C11_ATOMICS )
|
||||
# include <boost/smart_ptr/detail/sp_counted_base_clang.hpp>
|
||||
|
||||
#elif defined( __SNC__ )
|
||||
# include <boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp>
|
||||
|
||||
|
@ -79,4 +88,6 @@
|
|||
|
||||
#endif
|
||||
|
||||
#undef BOOST_SP_HAS_CLANG_C11_ATOMICS
|
||||
|
||||
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED
|
||||
|
|
140
miniboost/boost/smart_ptr/detail/sp_counted_base_clang.hpp
Normal file
140
miniboost/boost/smart_ptr/detail/sp_counted_base_clang.hpp
Normal file
|
@ -0,0 +1,140 @@
|
|||
#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED
|
||||
#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
// detail/sp_counted_base_clang.hpp - __c11 clang intrinsics
|
||||
//
|
||||
// Copyright (c) 2007, 2013, 2015 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
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
typedef _Atomic( boost::int_least32_t ) atomic_int_least32_t;
|
||||
|
||||
inline void atomic_increment( atomic_int_least32_t * pw )
|
||||
{
|
||||
__c11_atomic_fetch_add( pw, 1, __ATOMIC_RELAXED );
|
||||
}
|
||||
|
||||
inline boost::int_least32_t atomic_decrement( atomic_int_least32_t * pw )
|
||||
{
|
||||
return __c11_atomic_fetch_sub( pw, 1, __ATOMIC_ACQ_REL );
|
||||
}
|
||||
|
||||
inline boost::int_least32_t atomic_conditional_increment( atomic_int_least32_t * pw )
|
||||
{
|
||||
// long r = *pw;
|
||||
// if( r != 0 ) ++*pw;
|
||||
// return r;
|
||||
|
||||
boost::int_least32_t r = __c11_atomic_load( pw, __ATOMIC_RELAXED );
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
if( r == 0 )
|
||||
{
|
||||
return r;
|
||||
}
|
||||
|
||||
if( __c11_atomic_compare_exchange_weak( pw, &r, r + 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED ) )
|
||||
{
|
||||
return r;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class sp_counted_base
|
||||
{
|
||||
private:
|
||||
|
||||
sp_counted_base( sp_counted_base const & );
|
||||
sp_counted_base & operator= ( sp_counted_base const & );
|
||||
|
||||
atomic_int_least32_t use_count_; // #shared
|
||||
atomic_int_least32_t weak_count_; // #weak + (#shared != 0)
|
||||
|
||||
public:
|
||||
|
||||
sp_counted_base()
|
||||
{
|
||||
__c11_atomic_init( &use_count_, 1 );
|
||||
__c11_atomic_init( &weak_count_, 1 );
|
||||
}
|
||||
|
||||
virtual ~sp_counted_base() // nothrow
|
||||
{
|
||||
}
|
||||
|
||||
// dispose() is called when use_count_ drops to zero, to release
|
||||
// the resources managed by *this.
|
||||
|
||||
virtual void dispose() = 0; // nothrow
|
||||
|
||||
// destroy() is called when weak_count_ drops to zero.
|
||||
|
||||
virtual void destroy() // nothrow
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
{
|
||||
atomic_increment( &use_count_ );
|
||||
}
|
||||
|
||||
bool add_ref_lock() // true on success
|
||||
{
|
||||
return atomic_conditional_increment( &use_count_ ) != 0;
|
||||
}
|
||||
|
||||
void release() // nothrow
|
||||
{
|
||||
if( atomic_decrement( &use_count_ ) == 1 )
|
||||
{
|
||||
dispose();
|
||||
weak_release();
|
||||
}
|
||||
}
|
||||
|
||||
void weak_add_ref() // nothrow
|
||||
{
|
||||
atomic_increment( &weak_count_ );
|
||||
}
|
||||
|
||||
void weak_release() // nothrow
|
||||
{
|
||||
if( atomic_decrement( &weak_count_ ) == 1 )
|
||||
{
|
||||
destroy();
|
||||
}
|
||||
}
|
||||
|
||||
long use_count() const // nothrow
|
||||
{
|
||||
return __c11_atomic_load( const_cast< atomic_int_least32_t* >( &use_count_ ), __ATOMIC_ACQUIRE );
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED
|
|
@ -78,7 +78,7 @@ public:
|
|||
boost::checked_delete( px_ );
|
||||
}
|
||||
|
||||
virtual void * get_deleter( detail::sp_typeinfo const & )
|
||||
virtual void * get_deleter( sp_typeinfo const & )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ public:
|
|||
del( ptr );
|
||||
}
|
||||
|
||||
virtual void * get_deleter( detail::sp_typeinfo const & ti )
|
||||
virtual void * get_deleter( sp_typeinfo const & ti )
|
||||
{
|
||||
return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast<char&>( del ): 0;
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ public:
|
|||
a2.deallocate( this, 1 );
|
||||
}
|
||||
|
||||
virtual void * get_deleter( detail::sp_typeinfo const & ti )
|
||||
virtual void * get_deleter( sp_typeinfo const & ti )
|
||||
{
|
||||
return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast<char&>( d_ ): 0;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace boost
|
|||
namespace detail
|
||||
{
|
||||
|
||||
template< int I > class spinlock_pool
|
||||
template< int M > class spinlock_pool
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -72,7 +72,7 @@ public:
|
|||
};
|
||||
};
|
||||
|
||||
template< int I > spinlock spinlock_pool< I >::pool_[ 41 ] =
|
||||
template< int M > spinlock spinlock_pool< M >::pool_[ 41 ] =
|
||||
{
|
||||
BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT,
|
||||
BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT,
|
||||
|
|
|
@ -58,6 +58,16 @@ public:
|
|||
return p;
|
||||
}
|
||||
|
||||
weak_ptr<T> weak_from_this() BOOST_NOEXCEPT
|
||||
{
|
||||
return weak_this_;
|
||||
}
|
||||
|
||||
weak_ptr<T const> weak_from_this() const BOOST_NOEXCEPT
|
||||
{
|
||||
return weak_this_;
|
||||
}
|
||||
|
||||
public: // actually private, but avoids compiler template friendship issues
|
||||
|
||||
// Note: invoked automatically by shared_ptr; do not call
|
||||
|
|
|
@ -655,7 +655,7 @@ public:
|
|||
BOOST_ASSERT( px != 0 );
|
||||
BOOST_ASSERT( i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 ) );
|
||||
|
||||
return px[ i ];
|
||||
return static_cast< typename boost::detail::sp_array_access< T >::type >( px[ i ] );
|
||||
}
|
||||
|
||||
element_type * get() const BOOST_NOEXCEPT
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
// BOOST_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw
|
||||
// BOOST_HAS_NOTHROW_ASSIGN(T) should evaluate to true if t = u can not throw
|
||||
// BOOST_HAS_VIRTUAL_DESTRUCTOR(T) should evaluate to true T has a virtual destructor
|
||||
// BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T) should evaluate to true if T has a non-throwing move constructor.
|
||||
// BOOST_IS_NOTHROW_MOVE_ASSIGN(T) should evaluate to true if T has a non-throwing move assignment operator.
|
||||
//
|
||||
// The following can also be defined: when detected our implementation is greatly simplified.
|
||||
//
|
||||
|
@ -112,7 +114,10 @@
|
|||
# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__has_trivial_move_constructor(T) || __is_pod(T)) && !::boost::is_volatile<T>::value && !::boost::is_reference<T>::value)
|
||||
# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || __is_pod(T)) && ! ::boost::is_const<T>::value && !::boost::is_volatile<T>::value && !::boost::is_reference<T>::value)
|
||||
# endif
|
||||
|
||||
#if _MSC_FULL_VER >= 180020827
|
||||
# define BOOST_IS_NOTHROW_MOVE_ASSIGN(T) (__is_nothrow_assignable(T&, T&&))
|
||||
# define BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T) (__is_nothrow_constructible(T, T&&))
|
||||
#endif
|
||||
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
|
||||
#endif
|
||||
|
||||
|
@ -132,7 +137,13 @@
|
|||
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_CLANG) && defined(__has_feature)
|
||||
#if defined(BOOST_CLANG) && defined(__has_feature) && !defined(__CUDACC__)
|
||||
//
|
||||
// Note that these intrinsics are disabled for the CUDA meta-compiler as it appears
|
||||
// to not support them, even though the underlying clang compiler does so.
|
||||
// This is a rubbish fix as it basically stops type traits from working correctly,
|
||||
// but maybe the best we can do for now. See https://svn.boost.org/trac/boost/ticket/10694
|
||||
//
|
||||
# include <cstddef>
|
||||
# include <boost/type_traits/is_same.hpp>
|
||||
# include <boost/type_traits/is_reference.hpp>
|
||||
|
@ -244,6 +255,34 @@
|
|||
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
|
||||
#endif
|
||||
|
||||
#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)
|
||||
# include <boost/type_traits/is_same.hpp>
|
||||
# include <boost/type_traits/is_reference.hpp>
|
||||
# include <boost/type_traits/is_volatile.hpp>
|
||||
|
||||
# define BOOST_IS_UNION(T) __oracle_is_union(T)
|
||||
# define BOOST_IS_POD(T) __oracle_is_pod(T)
|
||||
# define BOOST_IS_EMPTY(T) __oracle_is_empty(T)
|
||||
# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__oracle_has_trivial_constructor(T) && ! ::boost::is_volatile<T>::value)
|
||||
# define BOOST_HAS_TRIVIAL_COPY(T) (__oracle_has_trivial_copy(T) && !is_reference<T>::value && ! ::boost::is_volatile<T>::value)
|
||||
# define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && ! ::boost::is_volatile<T>::value && ! ::boost::is_const<T>::value)
|
||||
# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __oracle_has_trivial_destructor(T)
|
||||
# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__oracle_has_nothrow_constructor(T) || __oracle_has_trivial_constructor(T) || __oracle_is_trivial(T))
|
||||
# define BOOST_HAS_NOTHROW_COPY(T) ((__oracle_has_nothrow_copy(T) || __oracle_has_trivial_copy(T) || __oracle_is_trivial(T)) && !is_volatile<T>::value && !is_reference<T>::value)
|
||||
# define BOOST_HAS_NOTHROW_ASSIGN(T) ((__oracle_has_nothrow_assign(T) || __oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && !is_volatile<T>::value && !is_const<T>::value)
|
||||
# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __oracle_has_virtual_destructor(T)
|
||||
|
||||
# define BOOST_IS_ABSTRACT(T) __oracle_is_abstract(T)
|
||||
//# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
|
||||
# define BOOST_IS_CLASS(T) __oracle_is_class(T)
|
||||
# define BOOST_IS_ENUM(T) __oracle_is_enum(T)
|
||||
# define BOOST_IS_POLYMORPHIC(T) __oracle_is_polymorphic(T)
|
||||
# define BOOST_ALIGNMENT_OF(T) __alignof__(T)
|
||||
# define BOOST_IS_FINAL(T) __oracle_is_final(T)
|
||||
|
||||
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
|
||||
#endif
|
||||
|
||||
#if defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600)
|
||||
# include <boost/type_traits/is_same.hpp>
|
||||
# include <boost/type_traits/is_reference.hpp>
|
||||
|
|
41
miniboost/boost/type_traits/is_final.hpp
Normal file
41
miniboost/boost/type_traits/is_final.hpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
|
||||
// Copyright (c) 2014 Agustin Berge
|
||||
//
|
||||
// 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/libs/type_traits for most recent version including documentation.
|
||||
|
||||
|
||||
#ifndef BOOST_TT_IS_FINAL_HPP_INCLUDED
|
||||
#define BOOST_TT_IS_FINAL_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
#include <boost/type_traits/config.hpp>
|
||||
#include <boost/type_traits/intrinsics.hpp>
|
||||
|
||||
// should be the last #include
|
||||
#include <boost/type_traits/detail/bool_trait_def.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace detail {
|
||||
template <typename T> struct is_final_impl
|
||||
{
|
||||
#ifdef BOOST_IS_FINAL
|
||||
typedef typename remove_cv<T>::type cvt;
|
||||
BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_FINAL(cvt));
|
||||
#else
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
#endif
|
||||
};
|
||||
} // namespace detail
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_final,T,::boost::detail::is_final_impl<T>::value)
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include <boost/type_traits/detail/bool_trait_undef.hpp>
|
||||
|
||||
#endif // BOOST_TT_IS_FINAL_HPP_INCLUDED
|
|
@ -29,7 +29,23 @@ namespace boost {
|
|||
|
||||
namespace detail{
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR)
|
||||
#ifdef BOOST_IS_NOTHROW_MOVE_ASSIGN
|
||||
|
||||
template <class T>
|
||||
struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_NOTHROW_MOVE_ASSIGN(T)); };
|
||||
template <class T>
|
||||
struct is_nothrow_move_assignable_imp<T const>{ BOOST_STATIC_CONSTANT(bool, value = false); };
|
||||
template <class T>
|
||||
struct is_nothrow_move_assignable_imp<T volatile>{ BOOST_STATIC_CONSTANT(bool, value = false); };
|
||||
template <class T>
|
||||
struct is_nothrow_move_assignable_imp<T const volatile>{ BOOST_STATIC_CONSTANT(bool, value = false); };
|
||||
template <class T>
|
||||
struct is_nothrow_move_assignable_imp<T&>{ BOOST_STATIC_CONSTANT(bool, value = false); };
|
||||
template <class T>
|
||||
struct is_nothrow_move_assignable_imp<T&&>{ BOOST_STATIC_CONSTANT(bool, value = false); };
|
||||
|
||||
|
||||
#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR)
|
||||
|
||||
template <class T, class Enable = void>
|
||||
struct false_or_cpp11_noexcept_move_assignable: public ::boost::false_type {};
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#define BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/type_traits/intrinsics.hpp>
|
||||
#include <boost/type_traits/has_trivial_move_constructor.hpp>
|
||||
#include <boost/type_traits/has_nothrow_copy.hpp>
|
||||
#include <boost/type_traits/is_array.hpp>
|
||||
|
@ -28,7 +29,25 @@ namespace boost {
|
|||
|
||||
namespace detail{
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR)
|
||||
#ifdef BOOST_IS_NOTHROW_MOVE_CONSTRUCT
|
||||
|
||||
template <class T>
|
||||
struct is_nothrow_move_constructible_imp{
|
||||
BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T));
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_nothrow_move_constructible_imp<volatile T> : public ::boost::false_type {};
|
||||
template <class T>
|
||||
struct is_nothrow_move_constructible_imp<const volatile T> : public ::boost::false_type{};
|
||||
template <class T>
|
||||
struct is_nothrow_move_constructible_imp<T&> : public ::boost::false_type{};
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <class T>
|
||||
struct is_nothrow_move_constructible_imp<T&&> : public ::boost::false_type{};
|
||||
#endif
|
||||
|
||||
#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR)
|
||||
|
||||
template <class T, class Enable = void>
|
||||
struct false_or_cpp11_noexcept_move_constructible: public ::boost::false_type {};
|
||||
|
|
|
@ -176,7 +176,7 @@ class type_with_alignment
|
|||
{
|
||||
};
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__GNUC__) || (defined (__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130))
|
||||
namespace tt_align_ns {
|
||||
struct __attribute__((__aligned__(2))) a2 {};
|
||||
struct __attribute__((__aligned__(4))) a4 {};
|
||||
|
|
|
@ -10,16 +10,16 @@
|
|||
#define BOOST_VERSION_HPP
|
||||
|
||||
//
|
||||
// Caution, this is the only boost header that is guarenteed
|
||||
// to change with every boost release, including this header
|
||||
// will cause a recompile every time a new boost version is
|
||||
// released.
|
||||
// Caution: this is the only Boost header that is guaranteed
|
||||
// to change with every Boost release. Including this header
|
||||
// will cause a recompile every time a new Boost version is
|
||||
// used.
|
||||
//
|
||||
// BOOST_VERSION % 100 is the patch level
|
||||
// BOOST_VERSION / 100 % 1000 is the minor version
|
||||
// BOOST_VERSION / 100000 is the major version
|
||||
|
||||
#define BOOST_VERSION 105700
|
||||
#define BOOST_VERSION 105800
|
||||
|
||||
//
|
||||
// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
|
||||
|
@ -27,6 +27,6 @@
|
|||
// number, y is the minor version number, and z is the patch level if not 0.
|
||||
// This is used by <config/auto_link.hpp> to select which library version to link to.
|
||||
|
||||
#define BOOST_LIB_VERSION "1_57"
|
||||
#define BOOST_LIB_VERSION "1_58"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -354,7 +354,7 @@
|
|||
/* Major and minor version number of the GNU C library package. Use
|
||||
these macros to test for features in specific releases. */
|
||||
#define __GLIBC__ 2
|
||||
#define __GLIBC_MINOR__ 21
|
||||
#define __GLIBC_MINOR__ 22
|
||||
|
||||
#define __GLIBC_PREREQ(maj, min) \
|
||||
((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
|
||||
|
|
|
@ -92,8 +92,6 @@ enum
|
|||
{ { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, __PTHREAD_SPINS, { 0, 0 } } }
|
||||
# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
|
||||
{ { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __PTHREAD_SPINS, { 0, 0 } } }
|
||||
# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
|
||||
{ { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __PTHREAD_SPINS, { 0, 0 } } }
|
||||
|
||||
# endif
|
||||
#else
|
||||
|
|
|
@ -146,12 +146,10 @@ extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
|
|||
extern int gsignal (int __sig) __THROW;
|
||||
#endif /* Use misc. */
|
||||
|
||||
#ifdef __USE_XOPEN2K
|
||||
#ifdef __USE_XOPEN2K8
|
||||
/* Print a message describing the meaning of the given signal number. */
|
||||
extern void psignal (int __sig, const char *__s);
|
||||
#endif /* Use POSIX 2008. */
|
||||
|
||||
#ifdef __USE_XOPEN2K
|
||||
/* Print a message describing the meaning of the given signal information. */
|
||||
extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
|
||||
#endif /* POSIX 2008. */
|
||||
|
|
|
@ -49,9 +49,14 @@
|
|||
# define __STDC_IEC_559_COMPLEX__ 1
|
||||
#endif
|
||||
|
||||
/* wchar_t uses ISO/IEC 10646 (2nd ed., published 2011-03-15) /
|
||||
Unicode 6.0. */
|
||||
#define __STDC_ISO_10646__ 201103L
|
||||
/* wchar_t uses Unicode 7.0.0. Version 7.0 of the Unicode Standard is
|
||||
synchronized with ISO/IEC 10646:2012, plus Amendments 1 (published
|
||||
on April, 2013) and 2 (not yet published as of February, 2015).
|
||||
Additionally, it includes the accelerated publication of U+20BD
|
||||
RUBLE SIGN. Therefore Unicode 7.0.0 is between 10646:2012 and
|
||||
10646:2014, and so we use the date ISO/IEC 10646:2012 Amd.1 was
|
||||
published. */
|
||||
#define __STDC_ISO_10646__ 201304L
|
||||
|
||||
/* We do not support C11 <threads.h>. */
|
||||
#define __STDC_NO_THREADS__ 1
|
||||
|
|
|
@ -31,12 +31,8 @@ __BEGIN_DECLS
|
|||
#define __need_NULL
|
||||
#include <stddef.h>
|
||||
|
||||
/* Provide correct C++ prototypes, and indicate this to the caller. This
|
||||
requires a compatible C++ standard library. As a heuristic, we provide
|
||||
these when the compiler indicates full conformance with C++98 or later,
|
||||
and for older GCC versions that are known to provide a compatible
|
||||
libstdc++. */
|
||||
#if defined __cplusplus && (__cplusplus >= 199711L || __GNUC_PREREQ (4, 4))
|
||||
/* Tell the caller that we provide correct C++ prototypes. */
|
||||
#if defined __cplusplus && __GNUC_PREREQ (4, 4)
|
||||
# define __CORRECT_ISO_CPP_STRING_H_PROTO
|
||||
#endif
|
||||
|
||||
|
|
|
@ -399,6 +399,14 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if (!defined _Static_assert && !defined __cplusplus \
|
||||
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
|
||||
&& (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__))
|
||||
# define _Static_assert(expr, diagnostic) \
|
||||
extern int (*__Static_assert_function (void)) \
|
||||
[!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
|
||||
#endif
|
||||
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
|
||||
|
|
|
@ -66,6 +66,9 @@ __BEGIN_DECLS
|
|||
/* The utilities on GNU systems also correspond to this version. */
|
||||
#define _POSIX2_VERSION __POSIX2_THIS_VERSION
|
||||
|
||||
/* This symbol was required until the 2001 edition of POSIX. */
|
||||
#define _POSIX2_C_VERSION __POSIX2_THIS_VERSION
|
||||
|
||||
/* If defined, the implementation supports the
|
||||
C Language Bindings Option. */
|
||||
#define _POSIX2_C_BIND __POSIX2_THIS_VERSION
|
||||
|
|
|
@ -145,11 +145,13 @@ __USING_NAMESPACE_STD(tm)
|
|||
__BEGIN_NAMESPACE_STD
|
||||
/* Copy SRC to DEST. */
|
||||
extern wchar_t *wcscpy (wchar_t *__restrict __dest,
|
||||
const wchar_t *__restrict __src) __THROW;
|
||||
const wchar_t *__restrict __src)
|
||||
__THROW __nonnull ((1, 2));
|
||||
|
||||
/* Copy no more than N wide-characters of SRC to DEST. */
|
||||
extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
|
||||
const wchar_t *__restrict __src, size_t __n)
|
||||
__THROW;
|
||||
__THROW __nonnull ((1, 2));
|
||||
|
||||
/* Append SRC onto DEST. */
|
||||
extern wchar_t *wcscat (wchar_t *__restrict __dest,
|
||||
|
|
Loading…
Add table
Reference in a new issue