diff --git a/src/boost/bind/arg.hpp b/src/boost/bind/arg.hpp deleted file mode 100644 index cb52e668..00000000 --- a/src/boost/bind/arg.hpp +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef BOOST_BIND_ARG_HPP_INCLUDED -#define BOOST_BIND_ARG_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// bind/arg.hpp -// -// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. -// -// 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/bind/bind.html for documentation. -// - -#include -#include - -namespace boost -{ - -template struct _arg_eq -{ -}; - -template<> struct _arg_eq -{ - typedef void type; -}; - -template< int I > struct arg -{ - BOOST_CONSTEXPR arg() - { - } - - template< class T > BOOST_CONSTEXPR arg( T const & /* t */, typename _arg_eq< I == is_placeholder::value >::type * = 0 ) - { - } -}; - -template< int I > BOOST_CONSTEXPR bool operator==( arg const &, arg const & ) -{ - return true; -} - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template< int I > struct is_placeholder< arg > -{ - enum _vt { value = I }; -}; - -template< int I > struct is_placeholder< arg (*) () > -{ - enum _vt { value = I }; -}; - -#endif - -} // namespace boost - -#endif // #ifndef BOOST_BIND_ARG_HPP_INCLUDED diff --git a/src/boost/bind/bind.hpp b/src/boost/bind/bind.hpp deleted file mode 100644 index fd0ee144..00000000 --- a/src/boost/bind/bind.hpp +++ /dev/null @@ -1,2346 +0,0 @@ -#ifndef BOOST_BIND_BIND_HPP_INCLUDED -#define BOOST_BIND_BIND_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// bind.hpp - binds function objects to arguments -// -// Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd. -// Copyright (c) 2001 David Abrahams -// Copyright (c) 2005 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) -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) -#include // std::forward -#endif - -// Borland-specific bug, visit_each() silently fails to produce code - -#if defined(BOOST_BORLANDC) -# define BOOST_BIND_VISIT_EACH boost::visit_each -#else -# define BOOST_BIND_VISIT_EACH visit_each -#endif - -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable: 4512) // assignment operator could not be generated -#endif - -namespace boost -{ - -template class weak_ptr; - -namespace _bi // implementation details -{ - -// ref_compare - -template bool ref_compare( T const & a, T const & b, long ) -{ - return a == b; -} - -template bool ref_compare( arg const &, arg const &, int ) -{ - return true; -} - -template bool ref_compare( arg (*) (), arg (*) (), int ) -{ - return true; -} - -template bool ref_compare( reference_wrapper const & a, reference_wrapper const & b, int ) -{ - return a.get_pointer() == b.get_pointer(); -} - -// bind_t forward declaration for listN - -template class bind_t; - -template bool ref_compare( bind_t const & a, bind_t const & b, int ) -{ - return a.compare( b ); -} - -// value - -template class value -{ -public: - - value(T const & t): t_(t) {} - - T & get() { return t_; } - T const & get() const { return t_; } - - bool operator==(value const & rhs) const - { - return t_ == rhs.t_; - } - -private: - - T t_; -}; - -// ref_compare for weak_ptr - -template bool ref_compare( value< weak_ptr > const & a, value< weak_ptr > const & b, int ) -{ - return !(a.get() < b.get()) && !(b.get() < a.get()); -} - -// type - -template class type {}; - -// unwrap - -template struct unwrapper -{ - static inline F & unwrap( F & f, long ) - { - return f; - } - - template static inline F2 & unwrap( reference_wrapper rf, int ) - { - return rf.get(); - } - - template static inline _mfi::dm unwrap( R T::* pm, int ) - { - return _mfi::dm( pm ); - } -}; - -// listN - -class list0 -{ -public: - - list0() {} - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A &, long) - { - return unwrapper::unwrap(f, 0)(); - } - - template R operator()(type, F const & f, A &, long) const - { - return unwrapper::unwrap(f, 0)(); - } - - template void operator()(type, F & f, A &, int) - { - unwrapper::unwrap(f, 0)(); - } - - template void operator()(type, F const & f, A &, int) const - { - unwrapper::unwrap(f, 0)(); - } - - template void accept(V &) const - { - } - - bool operator==(list0 const &) const - { - return true; - } -}; - -#ifdef BOOST_MSVC -// MSVC is bright enough to realise that the parameter rhs -// in operator==may be unused for some template argument types: -#pragma warning(push) -#pragma warning(disable:4100) -#endif - -template< class A1 > class list1: private storage1< A1 > -{ -private: - - typedef storage1< A1 > base_type; - -public: - - explicit list1( A1 a1 ): base_type( a1 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list1 const & rhs) const - { - return ref_compare(base_type::a1_, rhs.a1_, 0); - } -}; - -struct logical_and; -struct logical_or; - -template< class A1, class A2 > class list2: private storage2< A1, A2 > -{ -private: - - typedef storage2< A1, A2 > base_type; - -public: - - list2( A1 a1, A2 a2 ): base_type( a1, a2 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); - } - - template bool operator()( type, logical_and & /*f*/, A & a, int ) - { - return a[ base_type::a1_ ] && a[ base_type::a2_ ]; - } - - template bool operator()( type, logical_and const & /*f*/, A & a, int ) const - { - return a[ base_type::a1_ ] && a[ base_type::a2_ ]; - } - - template bool operator()( type, logical_or & /*f*/, A & a, int ) - { - return a[ base_type::a1_ ] || a[ base_type::a2_ ]; - } - - template bool operator()( type, logical_or const & /*f*/, A & a, int ) const - { - return a[ base_type::a1_ ] || a[ base_type::a2_ ]; - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list2 const & rhs) const - { - return ref_compare(base_type::a1_, rhs.a1_, 0) && ref_compare(base_type::a2_, rhs.a2_, 0); - } -}; - -template< class A1, class A2, class A3 > class list3: private storage3< A1, A2, A3 > -{ -private: - - typedef storage3< A1, A2, A3 > base_type; - -public: - - list3( A1 a1, A2 a2, A3 a3 ): base_type( a1, a2, a3 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list3 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ); - } -}; - -template< class A1, class A2, class A3, class A4 > class list4: private storage4< A1, A2, A3, A4 > -{ -private: - - typedef storage4< A1, A2, A3, A4 > base_type; - -public: - - list4( A1 a1, A2 a2, A3 a3, A4 a4 ): base_type( a1, a2, a3, a4 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list4 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5 > class list5: private storage5< A1, A2, A3, A4, A5 > -{ -private: - - typedef storage5< A1, A2, A3, A4, A5 > base_type; - -public: - - list5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): base_type( a1, a2, a3, a4, a5 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list5 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ); - } -}; - -template class list6: private storage6< A1, A2, A3, A4, A5, A6 > -{ -private: - - typedef storage6< A1, A2, A3, A4, A5, A6 > base_type; - -public: - - list6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): base_type( a1, a2, a3, a4, a5, a6 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - A6 operator[] (boost::arg<6>) const { return base_type::a6_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list6 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ) && - ref_compare( base_type::a6_, rhs.a6_, 0 ); - } -}; - -template class list7: private storage7< A1, A2, A3, A4, A5, A6, A7 > -{ -private: - - typedef storage7< A1, A2, A3, A4, A5, A6, A7 > base_type; - -public: - - list7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): base_type( a1, a2, a3, a4, a5, a6, a7 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - A6 operator[] (boost::arg<6>) const { return base_type::a6_; } - A7 operator[] (boost::arg<7>) const { return base_type::a7_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } - A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list7 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ) && - ref_compare( base_type::a6_, rhs.a6_, 0 ) && - ref_compare( base_type::a7_, rhs.a7_, 0 ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class list8: private storage8< A1, A2, A3, A4, A5, A6, A7, A8 > -{ -private: - - typedef storage8< A1, A2, A3, A4, A5, A6, A7, A8 > base_type; - -public: - - list8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - A6 operator[] (boost::arg<6>) const { return base_type::a6_; } - A7 operator[] (boost::arg<7>) const { return base_type::a7_; } - A8 operator[] (boost::arg<8>) const { return base_type::a8_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } - A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } - A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list8 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ) && - ref_compare( base_type::a6_, rhs.a6_, 0 ) && - ref_compare( base_type::a7_, rhs.a7_, 0 ) && - ref_compare( base_type::a8_, rhs.a8_, 0 ); - } -}; - -template class list9: private storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > -{ -private: - - typedef storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > base_type; - -public: - - list9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - A6 operator[] (boost::arg<6>) const { return base_type::a6_; } - A7 operator[] (boost::arg<7>) const { return base_type::a7_; } - A8 operator[] (boost::arg<8>) const { return base_type::a8_; } - A9 operator[] (boost::arg<9>) const { return base_type::a9_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } - A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } - A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } - A9 operator[] (boost::arg<9> (*) ()) const { return base_type::a9_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list9 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ) && - ref_compare( base_type::a6_, rhs.a6_, 0 ) && - ref_compare( base_type::a7_, rhs.a7_, 0 ) && - ref_compare( base_type::a8_, rhs.a8_, 0 ) && - ref_compare( base_type::a9_, rhs.a9_, 0 ); - } -}; - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -// bind_t - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !(defined(BOOST_GCC) && BOOST_GCC < 40600) - -template< class A1 > class rrlist1 -{ -private: - - A1 & a1_; // not A1&& because of msvc-10.0 - -public: - - explicit rrlist1( A1 & a1 ): a1_( a1 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } // not static_cast because of g++ 4.9 - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist1 a( a1_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist1 a( a1_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2 > class rrlist2 -{ -private: - - A1 & a1_; - A2 & a2_; - -public: - - rrlist2( A1 & a1, A2 & a2 ): a1_( a1 ), a2_( a2 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist2 a( a1_, a2_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist2 a( a1_, a2_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3 > class rrlist3 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - -public: - - rrlist3( A1 & a1, A2 & a2, A3 & a3 ): a1_( a1 ), a2_( a2 ), a3_( a3 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist3 a( a1_, a2_, a3_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist3 a( a1_, a2_, a3_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3, class A4 > class rrlist4 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - -public: - - rrlist4( A1 & a1, A2 & a2, A3 & a3, A4 & a4 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist4 a( a1_, a2_, a3_, a4_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist4 a( a1_, a2_, a3_, a4_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5 > class rrlist5 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - -public: - - rrlist5( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist5 a( a1_, a2_, a3_, a4_, a5_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist5 a( a1_, a2_, a3_, a4_, a5_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5, class A6 > class rrlist6 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - A6 & a6_; - -public: - - rrlist6( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ), a6_( a6 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6>) const { return std::forward( a6_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward( a6_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist6 a( a1_, a2_, a3_, a4_, a5_, a6_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist6 a( a1_, a2_, a3_, a4_, a5_, a6_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5, class A6, class A7 > class rrlist7 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - A6 & a6_; - A7 & a7_; - -public: - - rrlist7( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ), a6_( a6 ), a7_( a7 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6>) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7>) const { return std::forward( a7_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7> (*) ()) const { return std::forward( a7_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist7 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist7 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class rrlist8 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - A6 & a6_; - A7 & a7_; - A8 & a8_; - -public: - - rrlist8( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ), a6_( a6 ), a7_( a7 ), a8_( a8 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6>) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7>) const { return std::forward( a7_ ); } - A8 && operator[] (boost::arg<8>) const { return std::forward( a8_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7> (*) ()) const { return std::forward( a7_ ); } - A8 && operator[] (boost::arg<8> (*) ()) const { return std::forward( a8_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist8 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist8 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > class rrlist9 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - A6 & a6_; - A7 & a7_; - A8 & a8_; - A9 & a9_; - -public: - - rrlist9( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ), a6_( a6 ), a7_( a7 ), a8_( a8 ), a9_( a9 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6>) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7>) const { return std::forward( a7_ ); } - A8 && operator[] (boost::arg<8>) const { return std::forward( a8_ ); } - A9 && operator[] (boost::arg<9>) const { return std::forward( a9_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7> (*) ()) const { return std::forward( a7_ ); } - A8 && operator[] (boost::arg<8> (*) ()) const { return std::forward( a8_ ); } - A9 && operator[] (boost::arg<9> (*) ()) const { return std::forward( a9_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist9 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_, a9_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist9 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_, a9_ ); - return b.eval( a ); - } -}; - -template class bind_t -{ -private: - - F f_; - L l_; - -public: - - typedef typename result_traits::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(), f_, a, 0 ); - } - - result_type operator()() const - { - list0 a; - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1 ) - { - rrlist1< A1 > a( a1 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1 ) const - { - rrlist1< A1 > a( a1 ); - return l_(type(), f_, a, 0); - } - - template result_type operator()( A1 && a1, A2 && a2 ) - { - rrlist2< A1, A2 > a( a1, a2 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2 ) const - { - rrlist2< A1, A2 > a( a1, a2 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3 ) - { - rrlist3< A1, A2, A3 > a( a1, a2, a3 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3 ) const - { - rrlist3< A1, A2, A3 > a( a1, a2, a3 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) - { - rrlist4< A1, A2, A3, A4 > a( a1, a2, a3, a4 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) const - { - rrlist4< A1, A2, A3, A4 > a( a1, a2, a3, a4 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) - { - rrlist5< A1, A2, A3, A4, A5 > a( a1, a2, a3, a4, a5 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) const - { - rrlist5< A1, A2, A3, A4, A5 > a( a1, a2, a3, a4, a5 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) - { - rrlist6< A1, A2, A3, A4, A5, A6 > a( a1, a2, a3, a4, a5, a6 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) const - { - rrlist6< A1, A2, A3, A4, A5, A6 > a( a1, a2, a3, a4, a5, a6 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) - { - rrlist7< A1, A2, A3, A4, A5, A6, A7 > a( a1, a2, a3, a4, a5, a6, a7 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) const - { - rrlist7< A1, A2, A3, A4, A5, A6, A7 > a( a1, a2, a3, a4, a5, a6, a7 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) - { - rrlist8< A1, A2, A3, A4, A5, A6, A7, A8 > a( a1, a2, a3, a4, a5, a6, a7, a8 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) const - { - rrlist8< A1, A2, A3, A4, A5, A6, A7, A8 > a( a1, a2, a3, a4, a5, a6, a7, a8 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) - { - rrlist9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > a( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) const - { - rrlist9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > a( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); - return l_( type(), f_, a, 0 ); - } - - // - - template result_type eval( A & a ) - { - return l_( type(), f_, a, 0 ); - } - - template result_type eval( A & a ) const - { - return l_( type(), f_, a, 0 ); - } - - template void accept( V & v ) const - { -#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( BOOST_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 bind_t -{ -public: - - typedef bind_t this_type; - - bind_t(F f, L const & l): f_(f), l_(l) {} - -#define BOOST_BIND_RETURN return -#include -#undef BOOST_BIND_RETURN - -}; - -#else // no void returns - -template struct bind_t_generator -{ - -template class implementation -{ -public: - - typedef implementation this_type; - - implementation(F f, L const & l): f_(f), l_(l) {} - -#define BOOST_BIND_RETURN return -#include -#undef BOOST_BIND_RETURN - -}; - -}; - -template<> struct bind_t_generator -{ - -template class implementation -{ -private: - - typedef void R; - -public: - - typedef implementation this_type; - - implementation(F f, L const & l): f_(f), l_(l) {} - -#define BOOST_BIND_RETURN -#include -#undef BOOST_BIND_RETURN - -}; - -}; - -template class bind_t: public bind_t_generator::BOOST_NESTED_TEMPLATE implementation -{ -public: - - bind_t(F f, L const & l): bind_t_generator::BOOST_NESTED_TEMPLATE implementation(f, l) {} - -}; - -#endif - -// function_equal - -#ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP - -// put overloads in _bi, rely on ADL - -# ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -template bool function_equal( bind_t const & a, bind_t const & b ) -{ - return a.compare(b); -} - -# else - -template bool function_equal_impl( bind_t const & a, bind_t const & b, int ) -{ - return a.compare(b); -} - -# endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -#else // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP - -// put overloads in boost - -} // namespace _bi - -# ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -template bool function_equal( _bi::bind_t const & a, _bi::bind_t const & b ) -{ - return a.compare(b); -} - -# else - -template bool function_equal_impl( _bi::bind_t const & a, _bi::bind_t const & b, int ) -{ - return a.compare(b); -} - -# endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -namespace _bi -{ - -#endif // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP - -// add_value - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || (__SUNPRO_CC >= 0x530) - -#if defined( BOOST_BORLANDC ) && BOOST_WORKAROUND( BOOST_BORLANDC, BOOST_TESTED_AT(0x582) ) - -template struct add_value -{ - typedef _bi::value type; -}; - -#else - -template< class T, int I > struct add_value_2 -{ - typedef boost::arg type; -}; - -template< class T > struct add_value_2< T, 0 > -{ - typedef _bi::value< T > type; -}; - -template struct add_value -{ - typedef typename add_value_2< T, boost::is_placeholder< T >::value >::type type; -}; - -#endif - -template struct add_value< value > -{ - typedef _bi::value type; -}; - -template struct add_value< reference_wrapper > -{ - typedef reference_wrapper type; -}; - -template struct add_value< arg > -{ - typedef boost::arg type; -}; - -template struct add_value< arg (*) () > -{ - typedef boost::arg (*type) (); -}; - -template struct add_value< bind_t > -{ - typedef bind_t type; -}; - -#else - -template struct _avt_0; - -template<> struct _avt_0<1> -{ - template struct inner - { - typedef T type; - }; -}; - -template<> struct _avt_0<2> -{ - template struct inner - { - typedef value type; - }; -}; - -typedef char (&_avt_r1) [1]; -typedef char (&_avt_r2) [2]; - -template _avt_r1 _avt_f(value); -template _avt_r1 _avt_f(reference_wrapper); -template _avt_r1 _avt_f(arg); -template _avt_r1 _avt_f(arg (*) ()); -template _avt_r1 _avt_f(bind_t); - -_avt_r2 _avt_f(...); - -template struct add_value -{ - static T t(); - typedef typename _avt_0::template inner::type type; -}; - -#endif - -// list_av_N - -template struct list_av_1 -{ - typedef typename add_value::type B1; - typedef list1 type; -}; - -template struct list_av_2 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef list2 type; -}; - -template struct list_av_3 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef list3 type; -}; - -template struct list_av_4 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef list4 type; -}; - -template struct list_av_5 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef list5 type; -}; - -template struct list_av_6 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef typename add_value::type B6; - typedef list6 type; -}; - -template struct list_av_7 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef typename add_value::type B6; - typedef typename add_value::type B7; - typedef list7 type; -}; - -template struct list_av_8 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef typename add_value::type B6; - typedef typename add_value::type B7; - typedef typename add_value::type B8; - typedef list8 type; -}; - -template struct list_av_9 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef typename add_value::type B6; - typedef typename add_value::type B7; - typedef typename add_value::type B8; - typedef typename add_value::type B9; - typedef list9 type; -}; - -// operator! - -struct logical_not -{ - template bool operator()(V const & v) const { return !v; } -}; - -template - bind_t< bool, logical_not, list1< bind_t > > - operator! (bind_t const & f) -{ - typedef list1< bind_t > list_type; - return bind_t ( logical_not(), list_type(f) ); -} - -// relational operators - -#define BOOST_BIND_OPERATOR( op, name ) \ -\ -struct name \ -{ \ - template bool operator()(V const & v, W const & w) const { return v op w; } \ -}; \ - \ -template \ - bind_t< bool, name, list2< bind_t, typename add_value::type > > \ - operator op (bind_t const & f, A2 a2) \ -{ \ - typedef typename add_value::type B2; \ - typedef list2< bind_t, B2> list_type; \ - return bind_t ( name(), list_type(f, a2) ); \ -} - -BOOST_BIND_OPERATOR( ==, equal ) -BOOST_BIND_OPERATOR( !=, not_equal ) - -BOOST_BIND_OPERATOR( <, less ) -BOOST_BIND_OPERATOR( <=, less_equal ) - -BOOST_BIND_OPERATOR( >, greater ) -BOOST_BIND_OPERATOR( >=, greater_equal ) - -BOOST_BIND_OPERATOR( &&, logical_and ) -BOOST_BIND_OPERATOR( ||, logical_or ) - -#undef BOOST_BIND_OPERATOR - -#if defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) - -// resolve ambiguity with rel_ops - -#define BOOST_BIND_OPERATOR( op, name ) \ -\ -template \ - bind_t< bool, name, list2< bind_t, bind_t > > \ - operator op (bind_t const & f, bind_t const & g) \ -{ \ - typedef list2< bind_t, bind_t > list_type; \ - return bind_t ( name(), list_type(f, g) ); \ -} - -BOOST_BIND_OPERATOR( !=, not_equal ) -BOOST_BIND_OPERATOR( <=, less_equal ) -BOOST_BIND_OPERATOR( >, greater ) -BOOST_BIND_OPERATOR( >=, greater_equal ) - -#endif - -// visit_each, ADL - -#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( BOOST_BORLANDC ) \ - && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) - -template void visit_each( V & v, value const & t, int ) -{ - using boost::visit_each; - BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); -} - -template void visit_each( V & v, bind_t const & t, int ) -{ - t.accept( v ); -} - -#endif - -} // namespace _bi - -// visit_each, no ADL - -#if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) || defined( BOOST_BORLANDC ) \ - || (defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) - -template void visit_each( V & v, _bi::value const & t, int ) -{ - BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); -} - -template void visit_each( V & v, _bi::bind_t const & t, int ) -{ - t.accept( v ); -} - -#endif - -// is_bind_expression - -template< class T > struct is_bind_expression -{ - enum _vt { value = 0 }; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template< class R, class F, class L > struct is_bind_expression< _bi::bind_t< R, F, L > > -{ - enum _vt { value = 1 }; -}; - -#endif - -// bind - -#ifndef BOOST_BIND -#define BOOST_BIND bind -#endif - -// generic function objects - -template - _bi::bind_t - BOOST_BIND(F f) -{ - typedef _bi::list0 list_type; - return _bi::bind_t (f, list_type()); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1) -{ - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t (f, list_type(a1)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2) -{ - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t (f, list_type(a1, a2)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) -{ - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -// generic function objects, alternative syntax - -template - _bi::bind_t - BOOST_BIND(boost::type, F f) -{ - typedef _bi::list0 list_type; - return _bi::bind_t (f, list_type()); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1) -{ - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t (f, list_type(a1)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2) -{ - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t (f, list_type(a1, a2)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3) -{ - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) - -// adaptable function objects - -template - _bi::bind_t<_bi::unspecified, F, _bi::list0> - BOOST_BIND(F f) -{ - typedef _bi::list0 list_type; - return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type()); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_1::type> - BOOST_BIND(F f, A1 a1) -{ - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_2::type> - BOOST_BIND(F f, A1 a1, A2 a2) -{ - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1, a2)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_3::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) -{ - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_4::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_5::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_6::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_7::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_8::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_9::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -#endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) - -// function pointers - -#define BOOST_BIND_CC -#define BOOST_BIND_ST -#define BOOST_BIND_NOEXCEPT - -#include - -# if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED ) -# undef BOOST_BIND_NOEXCEPT -# define BOOST_BIND_NOEXCEPT noexcept -# include -# endif - -#undef BOOST_BIND_CC -#undef BOOST_BIND_ST -#undef BOOST_BIND_NOEXCEPT - -#if defined(BOOST_BIND_ENABLE_STDCALL) && !defined(_M_X64) - -#define BOOST_BIND_CC __stdcall -#define BOOST_BIND_ST -#define BOOST_BIND_NOEXCEPT - -#include - -#undef BOOST_BIND_CC -#undef BOOST_BIND_ST -#undef BOOST_BIND_NOEXCEPT - -#endif - -#if defined(BOOST_BIND_ENABLE_FASTCALL) && !defined(_M_X64) - -#define BOOST_BIND_CC __fastcall -#define BOOST_BIND_ST -#define BOOST_BIND_NOEXCEPT - -#include - -#undef BOOST_BIND_CC -#undef BOOST_BIND_ST -#undef BOOST_BIND_NOEXCEPT - -#endif - -#ifdef BOOST_BIND_ENABLE_PASCAL - -#define BOOST_BIND_ST pascal -#define BOOST_BIND_CC -#define BOOST_BIND_NOEXCEPT - -#include - -#undef BOOST_BIND_ST -#undef BOOST_BIND_CC -#undef BOOST_BIND_NOEXCEPT - -#endif - -// member function pointers - -#define BOOST_BIND_MF_NAME(X) X -#define BOOST_BIND_MF_CC -#define BOOST_BIND_MF_NOEXCEPT - -#include -#include - -# if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED ) -# undef BOOST_BIND_MF_NOEXCEPT -# define BOOST_BIND_MF_NOEXCEPT noexcept -# include -# include -# endif - -#undef BOOST_BIND_MF_NAME -#undef BOOST_BIND_MF_CC -#undef BOOST_BIND_MF_NOEXCEPT - -#if defined(BOOST_MEM_FN_ENABLE_CDECL) && !defined(_M_X64) - -#define BOOST_BIND_MF_NAME(X) X##_cdecl -#define BOOST_BIND_MF_CC __cdecl -#define BOOST_BIND_MF_NOEXCEPT - -#include -#include - -#undef BOOST_BIND_MF_NAME -#undef BOOST_BIND_MF_CC -#undef BOOST_BIND_MF_NOEXCEPT - -#endif - -#if defined(BOOST_MEM_FN_ENABLE_STDCALL) && !defined(_M_X64) - -#define BOOST_BIND_MF_NAME(X) X##_stdcall -#define BOOST_BIND_MF_CC __stdcall -#define BOOST_BIND_MF_NOEXCEPT - -#include -#include - -#undef BOOST_BIND_MF_NAME -#undef BOOST_BIND_MF_CC -#undef BOOST_BIND_MF_NOEXCEPT - -#endif - -#if defined(BOOST_MEM_FN_ENABLE_FASTCALL) && !defined(_M_X64) - -#define BOOST_BIND_MF_NAME(X) X##_fastcall -#define BOOST_BIND_MF_CC __fastcall -#define BOOST_BIND_MF_NOEXCEPT - -#include -#include - -#undef BOOST_BIND_MF_NAME -#undef BOOST_BIND_MF_CC -#undef BOOST_BIND_MF_NOEXCEPT - -#endif - -// data member pointers - -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - || ( defined(BOOST_BORLANDC) && BOOST_WORKAROUND( BOOST_BORLANDC, BOOST_TESTED_AT( 0x620 ) ) ) - -template -_bi::bind_t< R, _mfi::dm, typename _bi::list_av_1::type > - BOOST_BIND(R T::*f, A1 a1) -{ - typedef _mfi::dm F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t( F(f), list_type(a1) ); -} - -#else - -namespace _bi -{ - -template< class Pm, int I > struct add_cref; - -template< class M, class T > struct add_cref< M T::*, 0 > -{ - typedef M type; -}; - -template< class M, class T > struct add_cref< M T::*, 1 > -{ -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable:4180) -#endif - typedef M const & type; -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif -}; - -template< class R, class T > struct add_cref< R (T::*) (), 1 > -{ - typedef void type; -}; - -#if !defined(__IBMCPP__) || __IBMCPP_FUNC_CV_TMPL_ARG_DEDUCTION - -template< class R, class T > struct add_cref< R (T::*) () const, 1 > -{ - typedef void type; -}; - -#if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED ) - -template< class R, class T > struct add_cref< R (T::*) () const noexcept, 1 > -{ - typedef void type; -}; - -#endif // __cpp_noexcept_function_type - -#endif // __IBMCPP__ - -template struct isref -{ - enum value_type { value = 0 }; -}; - -template struct isref< R& > -{ - enum value_type { value = 1 }; -}; - -template struct isref< R* > -{ - enum value_type { value = 1 }; -}; - -template struct dm_result -{ - typedef typename add_cref< Pm, 1 >::type type; -}; - -template struct dm_result< Pm, bind_t > -{ - typedef typename bind_t::result_type result_type; - typedef typename add_cref< Pm, isref< result_type >::value >::type type; -}; - -} // namespace _bi - -template< class A1, class M, class T > - -_bi::bind_t< - typename _bi::dm_result< M T::*, A1 >::type, - _mfi::dm, - typename _bi::list_av_1::type -> - -BOOST_BIND( M T::*f, A1 a1 ) -{ - typedef typename _bi::dm_result< M T::*, A1 >::type result_type; - typedef _mfi::dm F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t< result_type, F, list_type >( F( f ), list_type( a1 ) ); -} - -#endif - -} // namespace boost - -#ifndef BOOST_BIND_NO_PLACEHOLDERS - -# include - -#endif - -#ifdef BOOST_MSVC -# pragma warning(default: 4512) // assignment operator could not be generated -# pragma warning(pop) -#endif - -#endif // #ifndef BOOST_BIND_BIND_HPP_INCLUDED diff --git a/src/boost/bind/bind_cc.hpp b/src/boost/bind/bind_cc.hpp deleted file mode 100644 index 278aa9a2..00000000 --- a/src/boost/bind/bind_cc.hpp +++ /dev/null @@ -1,117 +0,0 @@ -// -// bind/bind_cc.hpp - support for different calling conventions -// -// Do not include this header directly. -// -// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. -// -// 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/bind/bind.html for documentation. -// - -template - _bi::bind_t - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) () BOOST_BIND_NOEXCEPT) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) () BOOST_BIND_NOEXCEPT; - typedef _bi::list0 list_type; - return _bi::bind_t (f, list_type()); -} - -template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1) BOOST_BIND_NOEXCEPT, A1 a1) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1) BOOST_BIND_NOEXCEPT; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t (f, list_type(a1)); -} - -template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2) BOOST_BIND_NOEXCEPT; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t (f, list_type(a1, a2)); -} - -template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3) BOOST_BIND_NOEXCEPT; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3)); -} - -template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4) BOOST_BIND_NOEXCEPT; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5) BOOST_BIND_NOEXCEPT; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6) BOOST_BIND_NOEXCEPT; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_NOEXCEPT; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_NOEXCEPT; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9) BOOST_BIND_NOEXCEPT; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} diff --git a/src/boost/bind/bind_mf2_cc.hpp b/src/boost/bind/bind_mf2_cc.hpp deleted file mode 100644 index be20b1d9..00000000 --- a/src/boost/bind/bind_mf2_cc.hpp +++ /dev/null @@ -1,228 +0,0 @@ -// -// bind/bind_mf2_cc.hpp - member functions, type<> syntax -// -// Do not include this header directly. -// -// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. -// Copyright (c) 2008 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 -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - -// 0 - -template - _bi::bind_t, typename _bi::list_av_1::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) () BOOST_BIND_MF_NOEXCEPT, A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -template - _bi::bind_t, typename _bi::list_av_1::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -// 1 - -template - _bi::bind_t, typename _bi::list_av_2::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -template - _bi::bind_t, typename _bi::list_av_2::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -// 2 - -template - _bi::bind_t, typename _bi::list_av_3::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -template - _bi::bind_t, typename _bi::list_av_3::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -// 3 - -template - _bi::bind_t, typename _bi::list_av_4::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t, typename _bi::list_av_4::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -// 4 - -template - _bi::bind_t, typename _bi::list_av_5::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t, typename _bi::list_av_5::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -// 5 - -template - _bi::bind_t, typename _bi::list_av_6::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t, typename _bi::list_av_6::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -// 6 - -template - _bi::bind_t, typename _bi::list_av_7::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t, typename _bi::list_av_7::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -// 7 - -template - _bi::bind_t, typename _bi::list_av_8::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t, typename _bi::list_av_8::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -// 8 - -template - _bi::bind_t, typename _bi::list_av_9::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -template - _bi::bind_t, typename _bi::list_av_9::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} diff --git a/src/boost/bind/bind_mf_cc.hpp b/src/boost/bind/bind_mf_cc.hpp deleted file mode 100644 index 5a1610b4..00000000 --- a/src/boost/bind/bind_mf_cc.hpp +++ /dev/null @@ -1,441 +0,0 @@ -// -// bind/bind_mf_cc.hpp - support for different calling conventions -// -// Do not include this header directly. -// -// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. -// -// 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/bind/bind.html for documentation. -// - -// 0 - -template - _bi::bind_t, typename _bi::list_av_1::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () BOOST_BIND_MF_NOEXCEPT, A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -template - _bi::bind_t, typename _bi::list_av_1::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_1::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () BOOST_BIND_MF_NOEXCEPT, A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_1::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -// 1 - -template - _bi::bind_t, typename _bi::list_av_2::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -template - _bi::bind_t, typename _bi::list_av_2::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_2::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_2::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -// 2 - -template - _bi::bind_t, typename _bi::list_av_3::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -template - _bi::bind_t, typename _bi::list_av_3::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_3::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_3::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -// 3 - -template - _bi::bind_t, typename _bi::list_av_4::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t, typename _bi::list_av_4::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_4::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_4::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -// 4 - -template - _bi::bind_t, typename _bi::list_av_5::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t, typename _bi::list_av_5::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_5::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_5::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -// 5 - -template - _bi::bind_t, typename _bi::list_av_6::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t, typename _bi::list_av_6::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_6::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_6::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -// 6 - -template - _bi::bind_t, typename _bi::list_av_7::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t, typename _bi::list_av_7::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_7::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_7::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -// 7 - -template - _bi::bind_t, typename _bi::list_av_8::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t, typename _bi::list_av_8::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_8::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_8::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -// 8 - -template - _bi::bind_t, typename _bi::list_av_9::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -template - _bi::bind_t, typename _bi::list_av_9::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_9::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_9::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} diff --git a/src/boost/bind/bind_template.hpp b/src/boost/bind/bind_template.hpp deleted file mode 100644 index 212ced7f..00000000 --- a/src/boost/bind/bind_template.hpp +++ /dev/null @@ -1,345 +0,0 @@ -// -// bind/bind_template.hpp -// -// Do not include this header directly. -// -// Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd. -// -// 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/bind/bind.html for documentation. -// - - typedef typename result_traits::type result_type; - - result_type operator()() - { - list0 a; - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - result_type operator()() const - { - list0 a; - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1) - { - list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1) const - { - list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1) - { - list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1) const - { - list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2) - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2) const - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 & a2) - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 & a2) const - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - - template result_type operator()(A1 & a1, A2 const & a2) - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 const & a2) const - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - - template result_type operator()(A1 const & a1, A2 const & a2) - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2) const - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3) - { - list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3) const - { - list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) - { - list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const - { - list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) - { - list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const - { - list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) - { - list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const - { - list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) - { - list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const - { - list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) - { - list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const - { - list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) - { - list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const - { - list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) - { - list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const - { - list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) - { - list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const - { - list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) - { - list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const - { - list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) - { - list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const - { - list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) - { - list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const - { - list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) - { - list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const - { - list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) - { - list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const - { - list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type eval(A & a) - { - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type eval(A & a) const - { - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template void accept(V & v) const - { -#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( BOOST_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_; - } - -private: - - F f_; - L l_; diff --git a/src/boost/bind/detail/is_same.hpp b/src/boost/bind/detail/is_same.hpp deleted file mode 100644 index 995b39f4..00000000 --- a/src/boost/bind/detail/is_same.hpp +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef BOOST_BIND_DETAIL_IS_SAME_HPP_INCLUDED -#define BOOST_BIND_DETAIL_IS_SAME_HPP_INCLUDED - -// is_same::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 - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -namespace boost -{ -namespace _bi -{ - -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 _bi -} // namespace boost - -#endif // #ifndef BOOST_BIND_DETAIL_IS_SAME_HPP_INCLUDED diff --git a/src/boost/bind/detail/result_traits.hpp b/src/boost/bind/detail/result_traits.hpp deleted file mode 100644 index d57d9fd1..00000000 --- a/src/boost/bind/detail/result_traits.hpp +++ /dev/null @@ -1,165 +0,0 @@ -#ifndef BOOST_BIND_DETAIL_RESULT_TRAITS_HPP_INCLUDED -#define BOOST_BIND_DETAIL_RESULT_TRAITS_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// bind/detail/result_traits.hpp -// -// boost/bind.hpp support header, return type deduction -// -// Copyright 2006, 2020 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 -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - -#include -#include - -#if BOOST_CXX_VERSION >= 201700L -#include -#endif - -namespace boost -{ - -namespace _bi -{ - -template struct result_traits -{ - typedef R type; -}; - -struct unspecified {}; - -template struct result_traits -{ - typedef typename F::result_type type; -}; - -template struct result_traits< unspecified, reference_wrapper > -{ - typedef typename F::result_type type; -}; - -#if BOOST_CXX_VERSION >= 201700L - -template struct result_traits< unspecified, std::plus > -{ - typedef T type; -}; - -template struct result_traits< unspecified, std::minus > -{ - typedef T type; -}; - -template struct result_traits< unspecified, std::multiplies > -{ - typedef T type; -}; - -template struct result_traits< unspecified, std::divides > -{ - typedef T type; -}; - -template struct result_traits< unspecified, std::modulus > -{ - typedef T type; -}; - -template struct result_traits< unspecified, std::negate > -{ - typedef T type; -}; - -template struct result_traits< unspecified, std::equal_to > -{ - typedef bool type; -}; - -template struct result_traits< unspecified, std::not_equal_to > -{ - typedef bool type; -}; - -template struct result_traits< unspecified, std::greater > -{ - typedef bool type; -}; - -template struct result_traits< unspecified, std::less > -{ - typedef bool type; -}; - -template struct result_traits< unspecified, std::greater_equal > -{ - typedef bool type; -}; - -template struct result_traits< unspecified, std::less_equal > -{ - typedef bool type; -}; - -template struct result_traits< unspecified, std::logical_and > -{ - typedef bool type; -}; - -template struct result_traits< unspecified, std::logical_or > -{ - typedef bool type; -}; - -template struct result_traits< unspecified, std::logical_not > -{ - typedef bool type; -}; - -template struct result_traits< unspecified, std::bit_and > -{ - typedef T type; -}; - -template struct result_traits< unspecified, std::bit_or > -{ - typedef T type; -}; - -template struct result_traits< unspecified, std::bit_xor > -{ - typedef T type; -}; - -#if defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 40900 - -// libstdc++ 4.8 and below don't have std::bit_not - -#else - -template struct result_traits< unspecified, std::bit_not > -{ - typedef T type; -}; - -#endif - -#endif - -} // namespace _bi - -} // namespace boost - -#endif // #ifndef BOOST_BIND_DETAIL_RESULT_TRAITS_HPP_INCLUDED diff --git a/src/boost/bind/placeholders.hpp b/src/boost/bind/placeholders.hpp deleted file mode 100644 index 5e4b96d8..00000000 --- a/src/boost/bind/placeholders.hpp +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED -#define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// bind/placeholders.hpp - _N definitions -// -// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. -// Copyright 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 -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - -#include -#include - -namespace boost -{ - -namespace placeholders -{ - -#if defined(BOOST_BORLANDC) || defined(__GNUC__) && (__GNUC__ < 4) - -inline boost::arg<1> _1() { return boost::arg<1>(); } -inline boost::arg<2> _2() { return boost::arg<2>(); } -inline boost::arg<3> _3() { return boost::arg<3>(); } -inline boost::arg<4> _4() { return boost::arg<4>(); } -inline boost::arg<5> _5() { return boost::arg<5>(); } -inline boost::arg<6> _6() { return boost::arg<6>(); } -inline boost::arg<7> _7() { return boost::arg<7>(); } -inline boost::arg<8> _8() { return boost::arg<8>(); } -inline boost::arg<9> _9() { return boost::arg<9>(); } - -#elif !defined(BOOST_NO_CXX17_INLINE_VARIABLES) - -BOOST_INLINE_CONSTEXPR boost::arg<1> _1; -BOOST_INLINE_CONSTEXPR boost::arg<2> _2; -BOOST_INLINE_CONSTEXPR boost::arg<3> _3; -BOOST_INLINE_CONSTEXPR boost::arg<4> _4; -BOOST_INLINE_CONSTEXPR boost::arg<5> _5; -BOOST_INLINE_CONSTEXPR boost::arg<6> _6; -BOOST_INLINE_CONSTEXPR boost::arg<7> _7; -BOOST_INLINE_CONSTEXPR boost::arg<8> _8; -BOOST_INLINE_CONSTEXPR boost::arg<9> _9; - -#else - -BOOST_STATIC_CONSTEXPR boost::arg<1> _1; -BOOST_STATIC_CONSTEXPR boost::arg<2> _2; -BOOST_STATIC_CONSTEXPR boost::arg<3> _3; -BOOST_STATIC_CONSTEXPR boost::arg<4> _4; -BOOST_STATIC_CONSTEXPR boost::arg<5> _5; -BOOST_STATIC_CONSTEXPR boost::arg<6> _6; -BOOST_STATIC_CONSTEXPR boost::arg<7> _7; -BOOST_STATIC_CONSTEXPR boost::arg<8> _8; -BOOST_STATIC_CONSTEXPR boost::arg<9> _9; - -#endif - -} // namespace placeholders - -} // namespace boost - -#endif // #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED diff --git a/src/boost/bind/std_placeholders.hpp b/src/boost/bind/std_placeholders.hpp deleted file mode 100644 index 125ff240..00000000 --- a/src/boost/bind/std_placeholders.hpp +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef BOOST_BIND_STD_PLACEHOLDERS_HPP_INCLUDED -#define BOOST_BIND_STD_PLACEHOLDERS_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// Copyright 2021 Peter Dimov -// Distributed under the Boost Software License, Version 1.0. -// https://www.boost.org/LICENSE_1_0.txt - -#include -#include -#include - -#if !defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) - -#include -#include - -namespace boost -{ - -template<> struct is_placeholder< typename std::decay::type > { enum _vt { value = 1 }; }; -template<> struct is_placeholder< typename std::decay::type > { enum _vt { value = 2 }; }; -template<> struct is_placeholder< typename std::decay::type > { enum _vt { value = 3 }; }; -template<> struct is_placeholder< typename std::decay::type > { enum _vt { value = 4 }; }; -template<> struct is_placeholder< typename std::decay::type > { enum _vt { value = 5 }; }; -template<> struct is_placeholder< typename std::decay::type > { enum _vt { value = 6 }; }; -template<> struct is_placeholder< typename std::decay::type > { enum _vt { value = 7 }; }; -template<> struct is_placeholder< typename std::decay::type > { enum _vt { value = 8 }; }; -template<> struct is_placeholder< typename std::decay::type > { enum _vt { value = 9 }; }; - -} // namespace boost - -#endif - -#endif // #ifndef BOOST_BIND_STD_PLACEHOLDERS_HPP_INCLUDED diff --git a/src/boost/bind/storage.hpp b/src/boost/bind/storage.hpp deleted file mode 100644 index 2ab0db18..00000000 --- a/src/boost/bind/storage.hpp +++ /dev/null @@ -1,476 +0,0 @@ -#ifndef BOOST_BIND_STORAGE_HPP_INCLUDED -#define BOOST_BIND_STORAGE_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// bind/storage.hpp -// -// boost/bind.hpp support header, optimized storage -// -// Copyright (c) 2006 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 -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - -#include -#include -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable: 4512) // assignment operator could not be generated -#endif - -namespace boost -{ - -namespace _bi -{ - -// 1 - -template struct storage1 -{ - explicit storage1( A1 a1 ): a1_( a1 ) {} - - template void accept(V & v) const - { - BOOST_BIND_VISIT_EACH(v, a1_, 0); - } - - A1 a1_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( BOOST_BORLANDC ) - -template struct storage1< boost::arg > -{ - explicit storage1( boost::arg ) {} - - template void accept(V &) const { } - - static boost::arg a1_() { return boost::arg(); } -}; - -template struct storage1< boost::arg (*) () > -{ - explicit storage1( boost::arg (*) () ) {} - - template void accept(V &) const { } - - static boost::arg a1_() { return boost::arg(); } -}; - -#endif - -// 2 - -template struct storage2: public storage1 -{ - typedef storage1 inherited; - - storage2( A1 a1, A2 a2 ): storage1( a1 ), a2_( a2 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a2_, 0); - } - - A2 a2_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage2< A1, boost::arg >: public storage1 -{ - typedef storage1 inherited; - - storage2( A1 a1, boost::arg ): storage1( a1 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a2_() { return boost::arg(); } -}; - -template struct storage2< A1, boost::arg (*) () >: public storage1 -{ - typedef storage1 inherited; - - storage2( A1 a1, boost::arg (*) () ): storage1( a1 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a2_() { return boost::arg(); } -}; - -#endif - -// 3 - -template struct storage3: public storage2< A1, A2 > -{ - typedef storage2 inherited; - - storage3( A1 a1, A2 a2, A3 a3 ): storage2( a1, a2 ), a3_( a3 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a3_, 0); - } - - A3 a3_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage3< A1, A2, boost::arg >: public storage2< A1, A2 > -{ - typedef storage2 inherited; - - storage3( A1 a1, A2 a2, boost::arg ): storage2( a1, a2 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a3_() { return boost::arg(); } -}; - -template struct storage3< A1, A2, boost::arg (*) () >: public storage2< A1, A2 > -{ - typedef storage2 inherited; - - storage3( A1 a1, A2 a2, boost::arg (*) () ): storage2( a1, a2 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a3_() { return boost::arg(); } -}; - -#endif - -// 4 - -template struct storage4: public storage3< A1, A2, A3 > -{ - typedef storage3 inherited; - - storage4( A1 a1, A2 a2, A3 a3, A4 a4 ): storage3( a1, a2, a3 ), a4_( a4 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a4_, 0); - } - - A4 a4_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage4< A1, A2, A3, boost::arg >: public storage3< A1, A2, A3 > -{ - typedef storage3 inherited; - - storage4( A1 a1, A2 a2, A3 a3, boost::arg ): storage3( a1, a2, a3 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a4_() { return boost::arg(); } -}; - -template struct storage4< A1, A2, A3, boost::arg (*) () >: public storage3< A1, A2, A3 > -{ - typedef storage3 inherited; - - storage4( A1 a1, A2 a2, A3 a3, boost::arg (*) () ): storage3( a1, a2, a3 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a4_() { return boost::arg(); } -}; - -#endif - -// 5 - -template struct storage5: public storage4< A1, A2, A3, A4 > -{ - typedef storage4 inherited; - - storage5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): storage4( a1, a2, a3, a4 ), a5_( a5 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a5_, 0); - } - - A5 a5_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage5< A1, A2, A3, A4, boost::arg >: public storage4< A1, A2, A3, A4 > -{ - typedef storage4 inherited; - - storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg ): storage4( a1, a2, a3, a4 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a5_() { return boost::arg(); } -}; - -template struct storage5< A1, A2, A3, A4, boost::arg (*) () >: public storage4< A1, A2, A3, A4 > -{ - typedef storage4 inherited; - - storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg (*) () ): storage4( a1, a2, a3, a4 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a5_() { return boost::arg(); } -}; - -#endif - -// 6 - -template struct storage6: public storage5< A1, A2, A3, A4, A5 > -{ - typedef storage5 inherited; - - storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): storage5( a1, a2, a3, a4, a5 ), a6_( a6 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a6_, 0); - } - - A6 a6_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage6< A1, A2, A3, A4, A5, boost::arg >: public storage5< A1, A2, A3, A4, A5 > -{ - typedef storage5 inherited; - - storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg ): storage5( a1, a2, a3, a4, a5 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a6_() { return boost::arg(); } -}; - -template struct storage6< A1, A2, A3, A4, A5, boost::arg (*) () >: public storage5< A1, A2, A3, A4, A5 > -{ - typedef storage5 inherited; - - storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg (*) () ): storage5( a1, a2, a3, a4, a5 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a6_() { return boost::arg(); } -}; - -#endif - -// 7 - -template struct storage7: public storage6< A1, A2, A3, A4, A5, A6 > -{ - typedef storage6 inherited; - - storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): storage6( a1, a2, a3, a4, a5, a6 ), a7_( a7 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a7_, 0); - } - - A7 a7_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg >: public storage6< A1, A2, A3, A4, A5, A6 > -{ - typedef storage6 inherited; - - storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg ): storage6( a1, a2, a3, a4, a5, a6 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a7_() { return boost::arg(); } -}; - -template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg (*) () >: public storage6< A1, A2, A3, A4, A5, A6 > -{ - typedef storage6 inherited; - - storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg (*) () ): storage6( a1, a2, a3, a4, a5, a6 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a7_() { return boost::arg(); } -}; - -#endif - -// 8 - -template struct storage8: public storage7< A1, A2, A3, A4, A5, A6, A7 > -{ - typedef storage7 inherited; - - storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): storage7( a1, a2, a3, a4, a5, a6, a7 ), a8_( a8 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a8_, 0); - } - - A8 a8_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg >: public storage7< A1, A2, A3, A4, A5, A6, A7 > -{ - typedef storage7 inherited; - - storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a8_() { return boost::arg(); } -}; - -template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg (*) () >: public storage7< A1, A2, A3, A4, A5, A6, A7 > -{ - typedef storage7 inherited; - - storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg (*) () ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a8_() { return boost::arg(); } -}; - -#endif - -// 9 - -template struct storage9: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > -{ - typedef storage8 inherited; - - storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ), a9_( a9 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a9_, 0); - } - - A9 a9_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > -{ - typedef storage8 inherited; - - storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a9_() { return boost::arg(); } -}; - -template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg (*) () >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > -{ - typedef storage8 inherited; - - storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg (*) () ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a9_() { return boost::arg(); } -}; - -#endif - -} // namespace _bi - -} // namespace boost - -#ifdef BOOST_MSVC -# pragma warning(default: 4512) // assignment operator could not be generated -# pragma warning(pop) -#endif - -#endif // #ifndef BOOST_BIND_STORAGE_HPP_INCLUDED diff --git a/src/boost/container/allocator_traits.hpp b/src/boost/container/allocator_traits.hpp deleted file mode 100644 index f5f73efa..00000000 --- a/src/boost/container/allocator_traits.hpp +++ /dev/null @@ -1,502 +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-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_ALLOCATOR_TRAITS_HPP -#define BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// container -#include -#include -#include //is_empty -#include -#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP -#include -#endif -// intrusive -#include -#include -// move -#include -// move/detail -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -// other boost -#include - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-result" -#endif - -#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 dtl { -#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 - -#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 dtl { -#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 - -#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 dtl { -#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 - -#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) -#pragma GCC diagnostic pop -#endif - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -template -class small_vector_allocator; - -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 dtl { - -//workaround needed for C++03 compilers with no construct() -//supporting rvalue references -template -struct is_std_allocator -{ static const bool value = false; }; - -template -struct is_std_allocator< std::allocator > -{ static const bool value = true; }; - -template -struct is_std_allocator< small_vector_allocator, Options > > -{ static const bool value = true; }; - -template -struct is_not_std_allocator -{ static const bool value = !is_std_allocator::value; }; - -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 dtl { - -#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 -struct allocator_traits -{ - //allocator_type - typedef Allocator allocator_type; - //value_type - typedef typename allocator_type::value_type value_type; - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Allocator::pointer if such a type exists; otherwise, value_type* - //! - typedef unspecified pointer; - //! Allocator::const_pointer if such a type exists ; otherwise, pointer_traits::rebind::rebind. - //! - typedef see_documentation void_pointer; - //! Allocator::const_void_pointer if such a type exists ; otherwise, pointer_traits::rebind::difference_type. - //! - typedef see_documentation difference_type; - //! Allocator::size_type if such a type exists ; otherwise, make_unsigned::type - //! - typedef see_documentation size_type; - //! Allocator::propagate_on_container_copy_assignment if such a type exists, otherwise a type - //! with an internal constant static boolean member value == false. - typedef see_documentation propagate_on_container_copy_assignment; - //! Allocator::propagate_on_container_move_assignment if such a type exists, otherwise a type - //! with an internal constant static boolean member value == false. - typedef see_documentation propagate_on_container_move_assignment; - //! Allocator::propagate_on_container_swap if such a type exists, otherwise a type - //! with an internal constant static boolean member value == false. - typedef see_documentation propagate_on_container_swap; - //! Allocator::is_always_equal if such a type exists, otherwise a type - //! with an internal constant static boolean member value == is_empty::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 value == false - //! Note: Non-standard extension used to implement `small_vector_allocator`. - typedef see_documentation is_partially_propagable; - //! Defines an allocator: Allocator::rebind::other if such a type exists; otherwise, Allocator - //! if Allocator is a class template instantiation of the form Allocator, where Args is zero or - //! more type arguments ; otherwise, the instantiation of rebind_alloc is ill-formed. - //! - //! In C++03 compilers rebind_alloc is a struct derived from an allocator - //! deduced by previously detailed rules. - template using rebind_alloc = see_documentation; - - //! In C++03 compilers rebind_traits is a struct derived from - //! allocator_traits, where OtherAlloc is - //! the allocator deduced by rules explained in rebind_alloc. - template using rebind_traits = allocator_traits >; - - //! Non-standard extension: Portable allocator rebind for C++03 and C++11 compilers. - //! type is an allocator related to Allocator deduced deduced by rules explained in rebind_alloc. - template - struct portable_rebind_alloc - { typedef see_documentation type; }; - #else - //pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - pointer, value_type*) - pointer; - //const_pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator, - const_pointer, typename boost::intrusive::pointer_traits::template - rebind_pointer) - const_pointer; - //reference - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - reference, typename dtl::unvoid_ref::type) - reference; - //const_reference - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - const_reference, typename dtl::unvoid_ref::type) - const_reference; - //void_pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator, - void_pointer, typename boost::intrusive::pointer_traits::template - rebind_pointer) - void_pointer; - //const_void_pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator, - const_void_pointer, typename boost::intrusive::pointer_traits::template - rebind_pointer) - const_void_pointer; - //difference_type - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - difference_type, std::ptrdiff_t) - difference_type; - //size_type - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - size_type, std::size_t) - size_type; - //propagate_on_container_copy_assignment - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - propagate_on_container_copy_assignment, dtl::false_type) - propagate_on_container_copy_assignment; - //propagate_on_container_move_assignment - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - propagate_on_container_move_assignment, dtl::false_type) - propagate_on_container_move_assignment; - //propagate_on_container_swap - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - propagate_on_container_swap, dtl::false_type) - propagate_on_container_swap; - //is_always_equal - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - is_always_equal, dtl::is_empty) - is_always_equal; - //is_partially_propagable - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - is_partially_propagable, dtl::false_type) - is_partially_propagable; - - //rebind_alloc & rebind_traits - #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - //C++11 - template using rebind_alloc = typename boost::intrusive::pointer_rebind::type; - template using rebind_traits = allocator_traits< rebind_alloc >; - #else // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - //Some workaround for C++03 or C++11 compilers with no template aliases - template - struct rebind_alloc : boost::intrusive::pointer_rebind::type - { - typedef typename boost::intrusive::pointer_rebind::type Base; - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - template - rebind_alloc(BOOST_FWD_REF(Args)... args) : Base(boost::forward(args)...) {} - #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - #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 - struct rebind_traits - : allocator_traits::type> - {}; - #endif // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - - //portable_rebind_alloc - template - struct portable_rebind_alloc - { typedef typename boost::intrusive::pointer_rebind::type type; }; - #endif //BOOST_CONTAINER_DOXYGEN_INVOKED - - //! Returns: a.allocate(n) - //! - BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n) - { return a.allocate(n); } - - //! Returns: a.deallocate(p, n) - //! - //! Throws: Nothing - BOOST_CONTAINER_FORCEINLINE static void deallocate(Allocator &a, pointer p, size_type n) - { a.deallocate(p, n); } - - //! Effects: calls a.allocate(n, p) if that call is well-formed; - //! otherwise, invokes a.allocate(n) - BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n, const_void_pointer p) - { - const bool value = boost::container::dtl:: - has_member_function_callable_with_allocate - ::value; - dtl::bool_ flag; - return allocator_traits::priv_allocate(flag, a, n, p); - } - - //! Effects: calls a.destroy(p) if that call is well-formed; - //! otherwise, invokes p->~T(). - template - BOOST_CONTAINER_FORCEINLINE static void destroy(Allocator &a, T*p) BOOST_NOEXCEPT_OR_NOTHROW - { - typedef T* destroy_pointer; - const bool value = boost::container::dtl:: - has_member_function_callable_with_destroy - ::value; - dtl::bool_ flag; - allocator_traits::priv_destroy(flag, a, p); - } - - //! Returns: a.max_size() if that expression is well-formed; otherwise, - //! numeric_limits::max(). - BOOST_CONTAINER_FORCEINLINE static size_type max_size(const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW - { - const bool value = allocator_traits_detail::has_max_size::value; - dtl::bool_ flag; - return allocator_traits::priv_max_size(flag, a); - } - - //! Returns: a.select_on_container_copy_construction() if that expression is well-formed; - //! otherwise, a. - BOOST_CONTAINER_FORCEINLINE static BOOST_CONTAINER_DOC1ST(Allocator, - typename dtl::if_c - < allocator_traits_detail::has_select_on_container_copy_construction::value - BOOST_MOVE_I Allocator BOOST_MOVE_I const Allocator & >::type) - select_on_container_copy_construction(const Allocator &a) - { - const bool value = allocator_traits_detail::has_select_on_container_copy_construction - ::value; - dtl::bool_ flag; - return allocator_traits::priv_select_on_container_copy_construction(flag, a); - } - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: calls a.construct(p, std::forward(args)...) if that call is well-formed; - //! otherwise, invokes `placement new` (static_cast(p)) T(std::forward(args)...) - template - BOOST_CONTAINER_FORCEINLINE static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args) - { - static const bool value = ::boost::move_detail::and_ - < dtl::is_not_std_allocator - , boost::container::dtl::has_member_function_callable_with_construct - < Allocator, T*, Args... > - >::value; - dtl::bool_ flag; - allocator_traits::priv_construct(flag, a, p, ::boost::forward(args)...); - } - #endif - - //! Returns: a.storage_is_unpropagable(p) if is_partially_propagable::value is true; otherwise, - //! false. - BOOST_CONTAINER_FORCEINLINE static bool storage_is_unpropagable(const Allocator &a, pointer p) BOOST_NOEXCEPT_OR_NOTHROW - { - dtl::bool_ flag; - return allocator_traits::priv_storage_is_unpropagable(flag, a, p); - } - - //! Returns: true if is_always_equal::value == true, otherwise, - //! a == b. - BOOST_CONTAINER_FORCEINLINE static bool equal(const Allocator &a, const Allocator &b) BOOST_NOEXCEPT_OR_NOTHROW - { - dtl::bool_ flag; - return allocator_traits::priv_equal(flag, a, b); - } - - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - private: - BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(dtl::true_type, Allocator &a, size_type n, const_void_pointer p) - { return a.allocate(n, p); } - - BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(dtl::false_type, Allocator &a, size_type n, const_void_pointer) - { return a.allocate(n); } - - template - BOOST_CONTAINER_FORCEINLINE static void priv_destroy(dtl::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW - { a.destroy(p); } - - template - BOOST_CONTAINER_FORCEINLINE static void priv_destroy(dtl::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW - { p->~T(); (void)p; } - - BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(dtl::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW - { return a.max_size(); } - - BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(dtl::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { return size_type(-1)/sizeof(value_type); } - - BOOST_CONTAINER_FORCEINLINE static Allocator priv_select_on_container_copy_construction(dtl::true_type, const Allocator &a) - { return a.select_on_container_copy_construction(); } - - BOOST_CONTAINER_FORCEINLINE static const Allocator &priv_select_on_container_copy_construction(dtl::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW - { return a; } - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - template - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args) - { a.construct( p, ::boost::forward(args)...); } - - template - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args) - { ::new((void*)p, boost_container_new_t()) T(::boost::forward(args)...); } - #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - public: - - #define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL(N) \ - template\ - BOOST_CONTAINER_FORCEINLINE static void construct(Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - static const bool value = ::boost::move_detail::and_ \ - < dtl::is_not_std_allocator \ - , boost::container::dtl::has_member_function_callable_with_construct \ - < Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_FWD_T##N > \ - >::value; \ - dtl::bool_ flag;\ - (priv_construct)(flag, a, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - }\ - // - BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL) - #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL - - private: - ///////////////////////////////// - // priv_construct - ///////////////////////////////// - #define BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL(N) \ - template\ - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::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\ - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::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_IMPL) - #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL - - #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p, const ::boost::container::default_init_t&) - { ::new((void*)p, boost_container_new_t()) T; } - - BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(dtl::true_type, const Allocator &a, pointer p) - { return a.storage_is_unpropagable(p); } - - BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(dtl::false_type, const Allocator &, pointer) - { return false; } - - BOOST_CONTAINER_FORCEINLINE static bool priv_equal(dtl::true_type, const Allocator &, const Allocator &) - { return true; } - - BOOST_CONTAINER_FORCEINLINE static bool priv_equal(dtl::false_type, const Allocator &a, const Allocator &b) - { return a == b; } - - #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) -}; - -#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - -template -struct real_allocator -{ - typedef AllocatorOrVoid type; -}; - -template -struct real_allocator -{ - typedef new_allocator type; -}; - -#endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - -} //namespace container { -} //namespace boost { - -#include - -#endif // ! defined(BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP) diff --git a/src/boost/container/container_fwd.hpp b/src/boost/container/container_fwd.hpp deleted file mode 100644 index 9e82fdef..00000000 --- a/src/boost/container/container_fwd.hpp +++ /dev/null @@ -1,388 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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_CONTAINER_CONTAINER_FWD_HPP -#define BOOST_CONTAINER_CONTAINER_FWD_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -//! \file -//! This header file forward declares the following containers: -//! - boost::container::vector -//! - boost::container::stable_vector -//! - boost::container::static_vector -//! - boost::container::small_vector_base -//! - boost::container::small_vector -//! - boost::container::devector -//! - boost::container::slist -//! - boost::container::list -//! - boost::container::set -//! - boost::container::multiset -//! - boost::container::map -//! - boost::container::multimap -//! - boost::container::flat_set -//! - boost::container::flat_multiset -//! - boost::container::flat_map -//! - boost::container::flat_multimap -//! - boost::container::basic_string -//! - boost::container::string -//! - boost::container::wstring -//! -//! Forward declares the following allocators: -//! - boost::container::allocator -//! - boost::container::node_allocator -//! - boost::container::adaptive_pool -//! -//! Forward declares the following polymorphic resource classes: -//! - boost::container::pmr::memory_resource -//! - boost::container::pmr::polymorphic_allocator -//! - boost::container::pmr::monotonic_buffer_resource -//! - boost::container::pmr::pool_options -//! - boost::container::pmr::unsynchronized_pool_resource -//! - boost::container::pmr::synchronized_pool_resource -//! -//! And finally it defines the following types - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//Std forward declarations -#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP - #include -#endif - -namespace boost{ -namespace intrusive{ -namespace detail{ - //Create namespace to avoid compilation errors -}}} - -namespace boost{ namespace container{ namespace dtl{ - namespace bi = boost::intrusive; - namespace bid = boost::intrusive::detail; -}}} - -namespace boost{ namespace container{ namespace pmr{ - namespace bi = boost::intrusive; - namespace bid = boost::intrusive::detail; -}}} - -#include - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -////////////////////////////////////////////////////////////////////////////// -// Containers -////////////////////////////////////////////////////////////////////////////// - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -template -class new_allocator; - -template -class vector; - -template -class stable_vector; - -template < class T - , std::size_t Capacity - , class Options = void> -class static_vector; - -template < class T - , class Allocator = void - , class Options = void > -class small_vector_base; - -template < class T - , std::size_t N - , class Allocator = void - , class Options = void > -class small_vector; - -template -class devector; - -template -class deque; - -template -class list; - -template -class slist; - -template - ,class Allocator = void - ,class Options = void> -class set; - -template - ,class Allocator = void - ,class Options = void > -class multiset; - -template - ,class Allocator = void - ,class Options = void > -class map; - -template - ,class Allocator = void - ,class Options = void > -class multimap; - -template - ,class Allocator = void > -class flat_set; - -template - ,class Allocator = void > -class flat_multiset; - -template - ,class Allocator = void > -class flat_map; - -template - ,class Allocator = void > -class flat_multimap; - -#ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES - -//! Alias templates for small_flat_[multi]{set|map} using small_vector as container - -template < class Key - , std::size_t N - , class Compare = std::less - , class SmallVectorAllocator = void - , class SmallVectorOptions = void > -using small_flat_set = flat_set>; - -template < class Key - , std::size_t N - , class Compare = std::less - , class SmallVectorAllocator = void - , class SmallVectorOptions = void > -using small_flat_multiset = flat_multiset>; - -template < class Key - , class T - , std::size_t N - , class Compare = std::less - , class SmallVectorAllocator = void - , class SmallVectorOptions = void > -using small_flat_map = flat_map, N, SmallVectorAllocator, SmallVectorOptions>>; - -template < class Key - , class T - , std::size_t N - , class Compare = std::less - , class SmallVectorAllocator = void - , class SmallVectorOptions = void > -using small_flat_multimap = flat_multimap, N, SmallVectorAllocator, SmallVectorOptions>>; - -#endif // #ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES - - -//! A portable metafunction to obtain a small_flat_set -template < class Key - , std::size_t N - , class Compare = std::less - , class SmallVectorAllocator = void - , class SmallVectorOptions = void > -struct small_flat_set_of -{ - typedef flat_set > type; -}; - -//! A portable metafunction to obtain a small_flat_multiset -template < class Key - , std::size_t N - , class Compare = std::less - , class SmallVectorAllocator = void - , class SmallVectorOptions = void > -struct small_flat_multiset_of -{ - typedef flat_multiset > type; -}; - -//! A portable metafunction to obtain a small_flat_map -template < class Key - , class T - , std::size_t N - , class Compare = std::less - , class SmallVectorAllocator = void - , class SmallVectorOptions = void > -struct small_flat_map_of -{ - typedef flat_map, N, SmallVectorAllocator, SmallVectorOptions> > type; -}; - -//! A portable metafunction to obtain a small_flat_multimap -template < class Key - , class T - , std::size_t N - , class Compare = std::less - , class SmallVectorAllocator = void - , class SmallVectorOptions = void > -struct small_flat_multimap_of -{ - typedef flat_multimap, N, SmallVectorAllocator, SmallVectorOptions> > type; -}; - -template - ,class Allocator = void > -class basic_string; - -typedef basic_string string; -typedef basic_string wstring; - -static const std::size_t ADP_nodes_per_block = 256u; -static const std::size_t ADP_max_free_blocks = 2u; -static const std::size_t ADP_overhead_percent = 1u; -static const std::size_t ADP_only_alignment = 0u; - -template < class T - , std::size_t NodesPerBlock = ADP_nodes_per_block - , std::size_t MaxFreeBlocks = ADP_max_free_blocks - , std::size_t OverheadPercent = ADP_overhead_percent - , unsigned Version = 2 - > -class adaptive_pool; - -template < class T - , unsigned Version = 2 - , unsigned int AllocationDisableMask = 0> -class allocator; - -static const std::size_t NodeAlloc_nodes_per_block = 256u; - -template - < class T - , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block - , std::size_t Version = 2> -class node_allocator; - -namespace pmr { - -class memory_resource; - -template -class polymorphic_allocator; - -class monotonic_buffer_resource; - -struct pool_options; - -template -class resource_adaptor_imp; - -class unsynchronized_pool_resource; - -class synchronized_pool_resource; - -} //namespace pmr { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! Type used to tag that the input range is -//! guaranteed to be ordered -struct ordered_range_t -{}; - -//! Value used to tag that the input range is -//! guaranteed to be ordered -static const ordered_range_t ordered_range = ordered_range_t(); - -//! Type used to tag that the input range is -//! guaranteed to be ordered and unique -struct ordered_unique_range_t - : public ordered_range_t -{}; - -//! Value used to tag that the input range is -//! guaranteed to be ordered and unique -static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t(); - -//! Type used to tag that the inserted values -//! should be default initialized -struct default_init_t -{}; - -//! Value used to tag that the inserted values -//! should be default initialized -static const default_init_t default_init = default_init_t(); -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! Type used to tag that the inserted values -//! should be value initialized -struct value_init_t -{}; - -//! Value used to tag that the inserted values -//! should be value initialized -static const value_init_t value_init = value_init_t(); - -namespace container_detail_really_deep_namespace { - -//Otherwise, gcc issues a warning of previously defined -//anonymous_instance and unique_instance -struct dummy -{ - dummy() - { - (void)ordered_range; - (void)ordered_unique_range; - (void)default_init; - } -}; - -} //detail_really_deep_namespace { - -typedef const std::piecewise_construct_t & piecewise_construct_t; - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -}} //namespace boost { namespace container { - -#endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP diff --git a/src/boost/container/detail/addressof.hpp b/src/boost/container/detail/addressof.hpp deleted file mode 100644 index 00679b8f..00000000 --- a/src/boost/container/detail/addressof.hpp +++ /dev/null @@ -1,33 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (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) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_DETAIL_ADDRESSOF_HPP -#define BOOST_CONTAINER_DETAIL_ADDRESSOF_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include - -namespace boost { -namespace container { -namespace dtl { - -using boost::move_detail::addressof; - -} //namespace dtl { -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_ADDRESSOF_HPP diff --git a/src/boost/container/detail/advanced_insert_int.hpp b/src/boost/container/detail/advanced_insert_int.hpp deleted file mode 100644 index 0238805d..00000000 --- a/src/boost/container/detail/advanced_insert_int.hpp +++ /dev/null @@ -1,542 +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_ADVANCED_INSERT_INT_HPP -#define BOOST_CONTAINER_ADVANCED_INSERT_INT_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// container -#include -// container/detail -#include -#include -#include -#include -#include -#include -#include -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -// move - -#include -#include -// other -#include - -namespace boost { namespace container { namespace dtl { - -template -struct move_insert_range_proxy -{ - typedef typename allocator_traits::value_type value_type; - - BOOST_CONTAINER_FORCEINLINE explicit move_insert_range_proxy(FwdIt first) - : first_(first) - {} - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) - { - this->first_ = ::boost::container::uninitialized_move_alloc_n_source - (a, this->first_, n, p); - } - - template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) - { - this->first_ = ::boost::container::move_n_source(this->first_, n, p); - } - - FwdIt first_; -}; - - -template -struct insert_range_proxy -{ - typedef typename allocator_traits::value_type value_type; - - BOOST_CONTAINER_FORCEINLINE explicit insert_range_proxy(FwdIt first) - : first_(first) - {} - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) - { - this->first_ = ::boost::container::uninitialized_copy_alloc_n_source(a, this->first_, n, p); - } - - template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) - { - this->first_ = ::boost::container::copy_n_source(this->first_, n, p); - } - - FwdIt first_; -}; - - -template -struct insert_n_copies_proxy -{ - typedef typename allocator_traits::value_type value_type; - - BOOST_CONTAINER_FORCEINLINE explicit insert_n_copies_proxy(const value_type &v) - : v_(v) - {} - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const - { boost::container::uninitialized_fill_alloc_n(a, v_, n, p); } - - template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const - { - while (n){ - --n; - *p = v_; - ++p; - } - } - - const value_type &v_; -}; - -template -struct insert_value_initialized_n_proxy -{ - typedef ::boost::container::allocator_traits alloc_traits; - typedef typename allocator_traits::value_type value_type; - typedef typename dtl::aligned_storage::value>::type storage_t; - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const - { boost::container::uninitialized_value_init_alloc_n(a, n, p); } - - template - void copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const - { - while (n){ - --n; - storage_t v; - alloc_traits::construct(a, move_detail::force_ptr(&v)); - value_type *vp = move_detail::force_ptr(&v); - value_destructor on_exit(a, *vp); (void)on_exit; - *p = ::boost::move(*vp); - ++p; - } - } -}; - -template -struct insert_default_initialized_n_proxy -{ - typedef ::boost::container::allocator_traits alloc_traits; - typedef typename allocator_traits::value_type value_type; - typedef typename dtl::aligned_storage::value>::type storage_t; - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const - { boost::container::uninitialized_default_init_alloc_n(a, n, p); } - - template - void copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const - { - if(!is_pod::value){ - while (n){ - --n; - typename dtl::aligned_storage::value>::type v; - alloc_traits::construct(a, move_detail::force_ptr(&v), default_init); - value_type *vp = move_detail::force_ptr(&v); - value_destructor on_exit(a, *vp); (void)on_exit; - *p = ::boost::move(*vp); - ++p; - } - } - } -}; - -template -struct insert_copy_proxy -{ - typedef boost::container::allocator_traits alloc_traits; - typedef typename alloc_traits::value_type value_type; - - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_copy_proxy(const value_type &v) - : v_(v) - {} - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const - { - BOOST_ASSERT(n == 1); (void)n; - alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), v_); - } - - template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const - { - BOOST_ASSERT(n == 1); (void)n; - *p = v_; - } - - const value_type &v_; -}; - - -template -struct insert_move_proxy -{ - typedef boost::container::allocator_traits alloc_traits; - typedef typename alloc_traits::value_type value_type; - - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_move_proxy(value_type &v) - : v_(v) - {} - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const - { - BOOST_ASSERT(n == 1); (void)n; - alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::move(v_) ); - } - - template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const - { - BOOST_ASSERT(n == 1); (void)n; - *p = ::boost::move(v_); - } - - value_type &v_; -}; - -template -BOOST_CONTAINER_FORCEINLINE insert_move_proxy get_insert_value_proxy(BOOST_RV_REF(typename boost::container::iterator_traits::value_type) v) -{ - return insert_move_proxy(v); -} - -template -BOOST_CONTAINER_FORCEINLINE insert_copy_proxy get_insert_value_proxy(const typename boost::container::iterator_traits::value_type &v) -{ - return insert_copy_proxy(v); -} - -}}} //namespace boost { namespace container { namespace dtl { - -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -#include -#include - -namespace boost { -namespace container { -namespace dtl { - -template -struct insert_nonmovable_emplace_proxy -{ - typedef boost::container::allocator_traits alloc_traits; - typedef typename alloc_traits::value_type value_type; - typedef typename build_number_seq::type index_tuple_t; - - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_nonmovable_emplace_proxy(BOOST_FWD_REF(Args)... args) - : args_(args...) - {} - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) - { this->priv_uninitialized_copy_some_and_update(a, index_tuple_t(), p, n); } - - private: - template - BOOST_CONTAINER_FORCEINLINE void priv_uninitialized_copy_some_and_update(Allocator &a, const index_tuple&, Iterator p, std::size_t n) - { - BOOST_ASSERT(n == 1); (void)n; - alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::forward(get(this->args_))... ); - } - - protected: - tuple args_; -}; - -template -struct insert_emplace_proxy - : public insert_nonmovable_emplace_proxy -{ - typedef insert_nonmovable_emplace_proxy base_t; - typedef boost::container::allocator_traits alloc_traits; - typedef typename base_t::value_type value_type; - typedef typename base_t::index_tuple_t index_tuple_t; - - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(BOOST_FWD_REF(Args)... args) - : base_t(::boost::forward(args)...) - {} - - template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &a, Iterator p, std::size_t n) - { this->priv_copy_some_and_update(a, index_tuple_t(), p, n); } - - private: - - template - BOOST_CONTAINER_FORCEINLINE void priv_copy_some_and_update(Allocator &a, const index_tuple&, Iterator p, std::size_t n) - { - BOOST_ASSERT(n ==1); (void)n; - typename dtl::aligned_storage::value>::type v; - alloc_traits::construct(a, move_detail::force_ptr(&v), ::boost::forward(get(this->args_))...); - value_type *vp = move_detail::force_ptr(&v); - BOOST_CONTAINER_TRY{ - *p = ::boost::move(*vp); - } - BOOST_CONTAINER_CATCH(...){ - alloc_traits::destroy(a, vp); - BOOST_CONTAINER_RETHROW - } - BOOST_CONTAINER_CATCH_END - alloc_traits::destroy(a, vp); - } -}; - -//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type -template -struct insert_emplace_proxy::value_type> - : public insert_move_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(typename boost::container::allocator_traits::value_type &&v) - : insert_move_proxy(v) - {} -}; - -//We use "add_const" here as adding "const" only confuses MSVC12(and maybe later) provoking -//compiler error C2752 ("more than one partial specialization matches"). -//Any problem is solvable with an extra layer of indirection? ;-) -template -struct insert_emplace_proxy::value_type>::type - > - : public insert_copy_proxy -{ - - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -template -struct insert_emplace_proxy::value_type &> - : public insert_copy_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -template -struct insert_emplace_proxy::value_type>::type & - > - : public insert_copy_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -}}} //namespace boost { namespace container { namespace dtl { - -#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -#include - -namespace boost { -namespace container { -namespace dtl { - -#define BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE(N) \ -template< class Allocator BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ -struct insert_nonmovable_emplace_proxy##N\ -{\ - typedef boost::container::allocator_traits alloc_traits;\ - typedef typename alloc_traits::value_type value_type;\ - \ - static const bool single_value = true;\ - \ - BOOST_CONTAINER_FORCEINLINE explicit insert_nonmovable_emplace_proxy##N(BOOST_MOVE_UREF##N)\ - BOOST_MOVE_COLON##N BOOST_MOVE_FWD_INIT##N {}\ - \ - template\ - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n)\ - {\ - BOOST_ASSERT(n == 1); (void)n;\ - alloc_traits::construct(a, boost::movelib::iterator_to_raw_pointer(p) BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\ - }\ - \ - template\ - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator, std::size_t)\ - { BOOST_ASSERT(false); }\ - \ - protected:\ - BOOST_MOVE_MREF##N\ -};\ -\ -template< class Allocator BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ -struct insert_emplace_proxy_arg##N\ - : insert_nonmovable_emplace_proxy##N< Allocator BOOST_MOVE_I##N BOOST_MOVE_TARG##N >\ -{\ - typedef insert_nonmovable_emplace_proxy##N\ - < Allocator BOOST_MOVE_I##N BOOST_MOVE_TARG##N > base_t;\ - typedef typename base_t::value_type value_type;\ - typedef boost::container::allocator_traits alloc_traits;\ - \ - static const bool single_value = true;\ - \ - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg##N(BOOST_MOVE_UREF##N)\ - : base_t(BOOST_MOVE_FWD##N){}\ - \ - template\ - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &a, Iterator p, std::size_t n)\ - {\ - BOOST_ASSERT(n == 1); (void)n;\ - typename dtl::aligned_storage::value>::type v;\ - alloc_traits::construct(a, move_detail::force_ptr(&v) BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\ - value_type *vp = move_detail::force_ptr(&v);\ - BOOST_CONTAINER_TRY{\ - *p = ::boost::move(*vp);\ - }\ - BOOST_CONTAINER_CATCH(...){\ - alloc_traits::destroy(a, vp);\ - BOOST_CONTAINER_RETHROW\ - }\ - BOOST_CONTAINER_CATCH_END\ - alloc_traits::destroy(a, vp);\ - }\ -};\ -// -BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE) -#undef BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE - -#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - -//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type -template -struct insert_emplace_proxy_arg1::value_type> > - : public insert_move_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits::value_type &v) - : insert_move_proxy(v) - {} -}; - -template -struct insert_emplace_proxy_arg1::value_type> - : public insert_copy_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -#else //e.g. MSVC10 & MSVC11 - -//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type -template -struct insert_emplace_proxy_arg1::value_type> - : public insert_move_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits::value_type &&v) - : insert_move_proxy(v) - {} -}; - -//We use "add_const" here as adding "const" only confuses MSVC10&11 provoking -//compiler error C2752 ("more than one partial specialization matches"). -//Any problem is solvable with an extra layer of indirection? ;-) -template -struct insert_emplace_proxy_arg1::value_type>::type - > - : public insert_copy_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -template -struct insert_emplace_proxy_arg1::value_type &> - : public insert_copy_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -template -struct insert_emplace_proxy_arg1::value_type>::type & - > - : public insert_copy_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -#endif - -}}} //namespace boost { namespace container { namespace dtl { - -#endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -#include - -#endif //#ifndef BOOST_CONTAINER_ADVANCED_INSERT_INT_HPP diff --git a/src/boost/container/detail/algorithm.hpp b/src/boost/container/detail/algorithm.hpp deleted file mode 100644 index ce5582bc..00000000 --- a/src/boost/container/detail/algorithm.hpp +++ /dev/null @@ -1,185 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (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_CONTAINER_DETAIL_ALGORITHM_HPP -#define BOOST_CONTAINER_DETAIL_ALGORITHM_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include - -namespace boost { -namespace container { - -using boost::intrusive::algo_equal; -using boost::intrusive::algo_lexicographical_compare; - -template -class binder1st -{ - public: - typedef typename Func::second_argument_type argument_type; - typedef typename Func::result_type result_type; - - binder1st(const Func& func, const typename Func::first_argument_type& arg) - : op(func), value(arg) - {} - - result_type operator()(const argument_type& arg) const - { return op(value, arg); } - - result_type operator()(argument_type& arg) const - { return op(value, arg); } - - private: - Func op; - typename Func::first_argument_type value; -}; - -template -inline binder1st bind1st(const Func& func, const T& arg) -{ return boost::container::binder1st(func, arg); } - -template -class binder2nd -{ - public: - typedef typename Func::first_argument_type argument_type; - typedef typename Func::result_type result_type; - - binder2nd(const Func& func, const typename Func::second_argument_type& arg) - : op(func), value(arg) - {} - - result_type operator()(const argument_type& arg) const - { return op(arg, value); } - - result_type operator()(argument_type& arg) const - { return op(arg, value); } - - private: - Func op; - typename Func::second_argument_type value; -}; - -template -inline binder2nd bind2nd(const Func& func, const T& arg) -{ - return (boost::container::binder2nd(func, arg)); -} - -template -class unary_negate -{ - public: - typedef typename Func::argument_type argument_type; - typedef typename Func::result_type result_type; - - explicit unary_negate(const Func& func) - : m_func(func) - {} - - bool operator()(const typename Func::argument_type& arg) const - { return !m_func(arg); } - - private: - Func m_func; -}; - -template inline -unary_negate not1(const Func& func) -{ - return boost::container::unary_negate(func); -} - -template -InputIt find_if(InputIt first, InputIt last, UnaryPredicate p) -{ - for (; first != last; ++first) { - if (p(*first)) { - return first; - } - } - return last; -} - -template - ForwardIt1 find_end (ForwardIt1 first1, ForwardIt1 last1 - ,ForwardIt2 first2, ForwardIt2 last2 - ,BinaryPredicate p) -{ - if (first2==last2) - return last1; // specified in C++11 - - ForwardIt1 ret = last1; - - while (first1!=last1) - { - ForwardIt1 it1 = first1; - ForwardIt2 it2 = first2; - while ( p(*it1, *it2) ) { - ++it1; ++it2; - if (it2==last2) { - ret=first1; - break; - } - if (it1==last1) - return ret; - } - ++first1; - } - return ret; -} - -template -InputIt find_first_of(InputIt first1, InputIt last1, ForwardIt first2, ForwardIt last2, BinaryPredicate p) -{ - for (; first1 != last1; ++first1) { - for (ForwardIt it = first2; it != last2; ++it) { - if (p(*first1, *it)) { - return first1; - } - } - } - return last1; -} - -template -ForwardIt1 search(ForwardIt1 first1, ForwardIt1 last1, - ForwardIt2 first2, ForwardIt2 last2, BinaryPredicate p) -{ - for (; ; ++first1) { - ForwardIt1 it = first1; - for (ForwardIt2 it2 = first2; ; ++it, ++it2) { - if (it2 == last2) { - return first1; - } - if (it == last1) { - return last1; - } - if (!p(*it, *it2)) { - break; - } - } - } -} - -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_ALGORITHM_HPP diff --git a/src/boost/container/detail/alloc_helpers.hpp b/src/boost/container/detail/alloc_helpers.hpp deleted file mode 100644 index 5ca2ca72..00000000 --- a/src/boost/container/detail/alloc_helpers.hpp +++ /dev/null @@ -1,60 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (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) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_DETAIL_ALLOC_TRAITS_HPP -#define BOOST_CONTAINER_DETAIL_ALLOC_TRAITS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -// move -#include -#include - -namespace boost { -namespace container { -namespace dtl { - -template -BOOST_CONTAINER_FORCEINLINE void swap_alloc(AllocatorType &, AllocatorType &, dtl::false_type) - BOOST_NOEXCEPT_OR_NOTHROW -{} - -template -BOOST_CONTAINER_FORCEINLINE void swap_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type) -{ boost::adl_move_swap(l, r); } - -template -BOOST_CONTAINER_FORCEINLINE void assign_alloc(AllocatorType &, const AllocatorType &, dtl::false_type) - BOOST_NOEXCEPT_OR_NOTHROW -{} - -template -BOOST_CONTAINER_FORCEINLINE void assign_alloc(AllocatorType &l, const AllocatorType &r, dtl::true_type) -{ l = r; } - -template -BOOST_CONTAINER_FORCEINLINE void move_alloc(AllocatorType &, AllocatorType &, dtl::false_type) - BOOST_NOEXCEPT_OR_NOTHROW -{} - -template -BOOST_CONTAINER_FORCEINLINE void move_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type) -{ l = ::boost::move(r); } - -} //namespace dtl { -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_ALLOC_TRAITS_HPP diff --git a/src/boost/container/detail/allocation_type.hpp b/src/boost/container/detail/allocation_type.hpp deleted file mode 100644 index 1e8aa673..00000000 --- a/src/boost/container/detail/allocation_type.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_ALLOCATION_TYPE_HPP -#define BOOST_CONTAINER_ALLOCATION_TYPE_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -enum allocation_type_v -{ - // constants for allocation commands - allocate_new_v = 0x01, - expand_fwd_v = 0x02, - expand_bwd_v = 0x04, -// expand_both = expand_fwd | expand_bwd, -// expand_or_new = allocate_new | expand_both, - shrink_in_place_v = 0x08, - nothrow_allocation_v = 0x10, - zero_memory_v = 0x20, - try_shrink_in_place_v = 0x40 -}; - -typedef unsigned int allocation_type; -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -static const allocation_type allocate_new = (allocation_type)allocate_new_v; -static const allocation_type expand_fwd = (allocation_type)expand_fwd_v; -static const allocation_type expand_bwd = (allocation_type)expand_bwd_v; -static const allocation_type shrink_in_place = (allocation_type)shrink_in_place_v; -static const allocation_type try_shrink_in_place= (allocation_type)try_shrink_in_place_v; -static const allocation_type nothrow_allocation = (allocation_type)nothrow_allocation_v; -static const allocation_type zero_memory = (allocation_type)zero_memory_v; - -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_ALLOCATION_TYPE_HPP diff --git a/src/boost/container/detail/allocator_version_traits.hpp b/src/boost/container/detail/allocator_version_traits.hpp deleted file mode 100644 index 391f4666..00000000 --- a/src/boost/container/detail/allocator_version_traits.hpp +++ /dev/null @@ -1,162 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2012-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_ALLOCATOR_VERSION_TRAITS_HPP -#define BOOST_CONTAINER_DETAIL_ALLOCATOR_VERSION_TRAITS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -#include //allocator_traits -#include -#include //multiallocation_chain -#include //version_type -#include //allocation_type -#include //integral_constant -#include //pointer_traits - -namespace boost { -namespace container { -namespace dtl { - -template::value> -struct allocator_version_traits -{ - typedef ::boost::container::dtl::integral_constant - alloc_version; - - typedef typename Allocator::multiallocation_chain multiallocation_chain; - - typedef typename boost::container::allocator_traits::pointer pointer; - typedef typename boost::container::allocator_traits::size_type size_type; - - //Node allocation interface - BOOST_CONTAINER_FORCEINLINE static pointer allocate_one(Allocator &a) - { return a.allocate_one(); } - - BOOST_CONTAINER_FORCEINLINE static void deallocate_one(Allocator &a, const pointer &p) - { a.deallocate_one(p); } - - BOOST_CONTAINER_FORCEINLINE static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m) - { return a.allocate_individual(n, m); } - - BOOST_CONTAINER_FORCEINLINE static void deallocate_individual(Allocator &a, multiallocation_chain &holder) - { a.deallocate_individual(holder); } - - BOOST_CONTAINER_FORCEINLINE static pointer allocation_command(Allocator &a, allocation_type command, - size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse) - { return a.allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); } -}; - -template -struct allocator_version_traits -{ - typedef ::boost::container::dtl::integral_constant - alloc_version; - - typedef typename boost::container::allocator_traits::pointer pointer; - typedef typename boost::container::allocator_traits::size_type size_type; - typedef typename boost::container::allocator_traits::value_type value_type; - - typedef typename boost::intrusive::pointer_traits:: - template rebind_pointer::type void_ptr; - typedef dtl::basic_multiallocation_chain - multialloc_cached_counted; - typedef boost::container::dtl:: - transform_multiallocation_chain - < multialloc_cached_counted, value_type> multiallocation_chain; - - //Node allocation interface - BOOST_CONTAINER_FORCEINLINE static pointer allocate_one(Allocator &a) - { return a.allocate(1); } - - BOOST_CONTAINER_FORCEINLINE static void deallocate_one(Allocator &a, const pointer &p) - { a.deallocate(p, 1); } - - static void deallocate_individual(Allocator &a, multiallocation_chain &holder) - { - size_type n = holder.size(); - typename multiallocation_chain::iterator it = holder.begin(); - while(n){ - --n; - pointer p = boost::intrusive::pointer_traits::pointer_to(*it); - ++it; - a.deallocate(p, 1); - } - } - - struct allocate_individual_rollback - { - BOOST_CONTAINER_FORCEINLINE allocate_individual_rollback(Allocator &a, multiallocation_chain &chain) - : mr_a(a), mp_chain(&chain) - {} - - BOOST_CONTAINER_FORCEINLINE ~allocate_individual_rollback() - { - if(mp_chain) - allocator_version_traits::deallocate_individual(mr_a, *mp_chain); - } - - BOOST_CONTAINER_FORCEINLINE void release() - { - mp_chain = 0; - } - - Allocator &mr_a; - multiallocation_chain * mp_chain; - }; - - static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m) - { - allocate_individual_rollback rollback(a, m); - while(n--){ - m.push_front(a.allocate(1)); - } - rollback.release(); - } - - static pointer allocation_command(Allocator &a, allocation_type command, - size_type, size_type &prefer_in_recvd_out_size, pointer &reuse) - { - pointer ret = pointer(); - if(BOOST_UNLIKELY(!(command & allocate_new) && !(command & nothrow_allocation))){ - throw_logic_error("version 1 allocator without allocate_new flag"); - } - else{ - BOOST_CONTAINER_TRY{ - ret = a.allocate(prefer_in_recvd_out_size); - } - BOOST_CONTAINER_CATCH(...){ - if(!(command & nothrow_allocation)){ - BOOST_CONTAINER_RETHROW - } - } - BOOST_CONTAINER_CATCH_END - reuse = pointer(); - } - return ret; - } -}; - -} //namespace dtl { -} //namespace container { -} //namespace boost { - -#include - -#endif // ! defined(BOOST_CONTAINER_DETAIL_ALLOCATOR_VERSION_TRAITS_HPP) diff --git a/src/boost/container/detail/compare_functors.hpp b/src/boost/container/detail/compare_functors.hpp deleted file mode 100644 index ae4ffcea..00000000 --- a/src/boost/container/detail/compare_functors.hpp +++ /dev/null @@ -1,134 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// (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_CONTAINER_DETAIL_COMPARE_FUNCTORS_HPP -#define BOOST_CONTAINER_DETAIL_COMPARE_FUNCTORS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { - -template -class equal_to_value -{ - typedef ValueType value_type; - const value_type &t_; - - public: - BOOST_CONTAINER_FORCEINLINE explicit equal_to_value(const value_type &t) - : t_(t) - {} - - BOOST_CONTAINER_FORCEINLINE bool operator()(const value_type &t)const - { return t_ == t; } -}; - -template -struct value_to_node_compare - : Pred -{ - typedef Pred predicate_type; - typedef Node node_type; - - BOOST_CONTAINER_FORCEINLINE value_to_node_compare() - : Pred() - {} - - BOOST_CONTAINER_FORCEINLINE explicit value_to_node_compare(Pred pred) - : Pred(pred) - {} - - BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a, const Node &b) const - { return static_cast(*this)(a.get_data(), b.get_data()); } - - BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a) const - { return static_cast(*this)(a.get_data()); } - - BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a, const Node &b) - { return static_cast(*this)(a.get_data(), b.get_data()); } - - BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a) - { return static_cast(*this)(a.get_data()); } - - BOOST_CONTAINER_FORCEINLINE predicate_type & predicate() { return static_cast(*this); } - BOOST_CONTAINER_FORCEINLINE const predicate_type & predicate() const { return static_cast(*this); } -}; - -template -struct key_node_pred - : public boost::intrusive::detail::ebo_functor_holder -{ - BOOST_CONTAINER_FORCEINLINE explicit key_node_pred(const KeyPred &comp) - : base_t(comp) - {} - - BOOST_CONTAINER_FORCEINLINE explicit key_node_pred() - {} - - typedef boost::intrusive::detail::ebo_functor_holder base_t; - typedef KeyPred key_predicate; - typedef KeyOfValue key_of_value; - typedef typename KeyOfValue::type key_type; - - - BOOST_CONTAINER_FORCEINLINE static const key_type &key_from(const Node &n) - { - return key_of_value()(n.get_data()); - } - - template - BOOST_CONTAINER_FORCEINLINE static const T & - key_from(const T &t) - { return t; } - - BOOST_CONTAINER_FORCEINLINE const key_predicate &key_pred() const - { return static_cast(*this); } - - BOOST_CONTAINER_FORCEINLINE key_predicate &key_pred() - { return static_cast(*this); } - - BOOST_CONTAINER_FORCEINLINE Ret operator()(const key_type &key) const - { return this->key_pred()(key); } - - template - BOOST_CONTAINER_FORCEINLINE Ret operator()(const U &nonkey) const - { return this->key_pred()(this->key_from(nonkey)); } - - BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const - { return this->key_pred()(key1, key2); } - - template - BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const U &nonkey2) const - { return this->key_pred()(key1, this->key_from(nonkey2)); } - - template - BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2) const - { return this->key_pred()(this->key_from(nonkey1), key2); } - - template - BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const V &nonkey2) const - { return this->key_pred()(this->key_from(nonkey1), this->key_from(nonkey2)); } -}; - - -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_DETAIL_COMPARE_FUNCTORS_HPP diff --git a/src/boost/container/detail/config_begin.hpp b/src/boost/container/detail/config_begin.hpp deleted file mode 100644 index e1075d1d..00000000 --- a/src/boost/container/detail/config_begin.hpp +++ /dev/null @@ -1,61 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED -#define BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED -#ifndef BOOST_CONFIG_HPP -#include -#endif - -#endif //BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED - -#ifdef BOOST_MSVC - #pragma warning (push) - #pragma warning (disable : 4619) // there is no warning number 'XXXX' - #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 : 4197) // top-level volatile in cast is ignored - #pragma warning (disable : 4251) // "identifier" : class "type" needs to have dll-interface to be used by clients of class "type2" - #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 : 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow) - #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 : 4706) // assignment within conditional expression - #pragma warning (disable : 4710) // function not inlined - #pragma warning (disable : 4714) // "function": marked as __forceinline 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 - -#endif //BOOST_MSVC - - -#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) -#pragma GCC diagnostic push -//Sign conversion warnings broken before GCC 9.3 -//(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87519) -#if BOOST_GCC < 90300 -#pragma GCC diagnostic ignored "-Wsign-conversion" -#endif -#endif diff --git a/src/boost/container/detail/config_end.hpp b/src/boost/container/detail/config_end.hpp deleted file mode 100644 index 65643ea1..00000000 --- a/src/boost/container/detail/config_end.hpp +++ /dev/null @@ -1,16 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#if defined BOOST_MSVC - #pragma warning (pop) -#endif - -#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) -#pragma GCC diagnostic pop -#endif diff --git a/src/boost/container/detail/construct_in_place.hpp b/src/boost/container/detail/construct_in_place.hpp deleted file mode 100644 index d824d814..00000000 --- a/src/boost/container/detail/construct_in_place.hpp +++ /dev/null @@ -1,98 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (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_CONTAINER_DETAIL_CONSTRUCT_IN_PLACE_HPP -#define BOOST_CONTAINER_DETAIL_CONSTRUCT_IN_PLACE_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include - -namespace boost { -namespace container { - -//In place construction - -struct iterator_arg_t{}; - -template -BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T* dest, InpIt source) -{ boost::container::allocator_traits::construct(a, dest, *source); } - -template -BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, value_init_construct_iterator) -{ - boost::container::allocator_traits::construct(a, dest); -} - -template -class default_init_construct_iterator; - -template -BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, default_init_construct_iterator) -{ - boost::container::allocator_traits::construct(a, dest, default_init); -} - -template -class emplace_iterator; - -template -BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, emplace_iterator ei) -{ - ei.construct_in_place(a, dest); -} - -//Assignment - -template -BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, InpIt source) -{ *dest = *source; } - -template -BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, value_init_construct_iterator) -{ - dtl::value_init val; - *dest = boost::move(val.get()); -} - -template -class default_init_construct_iterator; - -template -BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, default_init_construct_iterator) -{ - U u; - *dest = boost::move(u); -} - -template -class emplace_iterator; - -template -BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, emplace_iterator ei) -{ - ei.assign_in_place(dest); -} - -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_CONSTRUCT_IN_PLACE_HPP diff --git a/src/boost/container/detail/container_or_allocator_rebind.hpp b/src/boost/container/detail/container_or_allocator_rebind.hpp deleted file mode 100644 index 1525e41d..00000000 --- a/src/boost/container/detail/container_or_allocator_rebind.hpp +++ /dev/null @@ -1,53 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2017-2017. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP -#define BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include - -namespace boost { -namespace container { -namespace dtl { - -template::value> -struct container_or_allocator_rebind_impl - : container_rebind -{}; - -template -struct container_or_allocator_rebind_impl - : allocator_traits::template portable_rebind_alloc -{}; - -template -struct container_or_allocator_rebind_impl - : real_allocator -{}; - -template -struct container_or_allocator_rebind - : container_or_allocator_rebind_impl -{}; - -} //namespace dtl { -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_CONTAINER_OR_ALLOCATOR_REBIND_HPP diff --git a/src/boost/container/detail/container_rebind.hpp b/src/boost/container/detail/container_rebind.hpp deleted file mode 100644 index 854291ae..00000000 --- a/src/boost/container/detail/container_rebind.hpp +++ /dev/null @@ -1,163 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2017-2017. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_DETAIL_CONTAINER_REBIND_HPP -#define BOOST_CONTAINER_DETAIL_CONTAINER_REBIND_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - - -namespace boost { -namespace container { -namespace dtl { - - template - struct container_rebind; - -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template