]> git.lyx.org Git - lyx.git/commitdiff
Update boost to version 1.61
authorGeorg Baum <baum@lyx.org>
Tue, 7 Jun 2016 19:14:12 +0000 (21:14 +0200)
committerGeorg Baum <baum@lyx.org>
Tue, 7 Jun 2016 19:14:12 +0000 (21:14 +0200)
I updated using the new extract script. This gets rid of boost::bind, but the
other parts are still needed internally.

76 files changed:
3rdparty/boost/boost/align/align.hpp
3rdparty/boost/boost/align/detail/address.hpp [deleted file]
3rdparty/boost/boost/align/detail/align.hpp
3rdparty/boost/boost/bind.hpp [deleted file]
3rdparty/boost/boost/bind/arg.hpp [deleted file]
3rdparty/boost/boost/bind/bind.hpp [deleted file]
3rdparty/boost/boost/bind/bind_cc.hpp [deleted file]
3rdparty/boost/boost/bind/bind_mf2_cc.hpp [deleted file]
3rdparty/boost/boost/bind/bind_mf_cc.hpp [deleted file]
3rdparty/boost/boost/bind/bind_template.hpp [deleted file]
3rdparty/boost/boost/bind/placeholders.hpp [deleted file]
3rdparty/boost/boost/bind/storage.hpp [deleted file]
3rdparty/boost/boost/call_traits.hpp [deleted file]
3rdparty/boost/boost/config/compiler/clang.hpp
3rdparty/boost/boost/config/compiler/gcc.hpp
3rdparty/boost/boost/config/compiler/intel.hpp
3rdparty/boost/boost/config/compiler/nvcc.hpp
3rdparty/boost/boost/config/stdlib/libcpp.hpp
3rdparty/boost/boost/core/demangle.hpp
3rdparty/boost/boost/core/is_same.hpp [deleted file]
3rdparty/boost/boost/detail/call_traits.hpp [deleted file]
3rdparty/boost/boost/functional.hpp [deleted file]
3rdparty/boost/boost/is_placeholder.hpp [deleted file]
3rdparty/boost/boost/lexical_cast.hpp
3rdparty/boost/boost/lexical_cast/try_lexical_convert.hpp
3rdparty/boost/boost/math/special_functions/fpclassify.hpp
3rdparty/boost/boost/math/tools/config.hpp
3rdparty/boost/boost/move/core.hpp
3rdparty/boost/boost/move/detail/config_begin.hpp
3rdparty/boost/boost/move/detail/meta_utils.hpp
3rdparty/boost/boost/move/detail/workaround.hpp
3rdparty/boost/boost/move/utility.hpp
3rdparty/boost/boost/move/utility_core.hpp
3rdparty/boost/boost/none.hpp
3rdparty/boost/boost/none_t.hpp
3rdparty/boost/boost/operators.hpp
3rdparty/boost/boost/optional/detail/old_optional_implementation.hpp [new file with mode: 0644]
3rdparty/boost/boost/optional/detail/optional_aligned_storage.hpp [new file with mode: 0644]
3rdparty/boost/boost/optional/detail/optional_config.hpp [new file with mode: 0644]
3rdparty/boost/boost/optional/detail/optional_factory_support.hpp [new file with mode: 0644]
3rdparty/boost/boost/optional/detail/optional_reference_spec.hpp [new file with mode: 0644]
3rdparty/boost/boost/optional/detail/optional_relops.hpp [new file with mode: 0644]
3rdparty/boost/boost/optional/detail/optional_swap.hpp [new file with mode: 0644]
3rdparty/boost/boost/optional/optional.hpp
3rdparty/boost/boost/optional/optional_fwd.hpp
3rdparty/boost/boost/predef/hardware/simd.h
3rdparty/boost/boost/predef/hardware/simd/x86.h
3rdparty/boost/boost/predef/hardware/simd/x86_amd.h
3rdparty/boost/boost/predef/hardware/simd/x86_amd/versions.h
3rdparty/boost/boost/predef/os/cygwin.h
3rdparty/boost/boost/predef/version.h
3rdparty/boost/boost/preprocessor/config/config.hpp
3rdparty/boost/boost/range/const_iterator.hpp
3rdparty/boost/boost/regex/config.hpp
3rdparty/boost/boost/regex/v4/basic_regex_parser.hpp
3rdparty/boost/boost/regex/v4/fileiter.hpp
3rdparty/boost/boost/regex/v4/match_flags.hpp
3rdparty/boost/boost/regex/v4/mem_block_cache.hpp
3rdparty/boost/boost/smart_ptr/shared_ptr.hpp
3rdparty/boost/boost/type_index/stl_type_index.hpp
3rdparty/boost/boost/type_traits.hpp
3rdparty/boost/boost/type_traits/add_reference.hpp
3rdparty/boost/boost/type_traits/aligned_storage.hpp
3rdparty/boost/boost/type_traits/common_type.hpp
3rdparty/boost/boost/type_traits/detail/common_arithmetic_type.hpp
3rdparty/boost/boost/type_traits/detail/mp_defer.hpp
3rdparty/boost/boost/type_traits/has_nothrow_assign.hpp
3rdparty/boost/boost/type_traits/has_nothrow_constructor.hpp
3rdparty/boost/boost/type_traits/has_trivial_assign.hpp
3rdparty/boost/boost/type_traits/has_trivial_destructor.hpp
3rdparty/boost/boost/type_traits/is_default_constructible.hpp
3rdparty/boost/boost/type_traits/is_nothrow_move_assignable.hpp
3rdparty/boost/boost/type_traits/is_nothrow_move_constructible.hpp
3rdparty/boost/boost/version.hpp
3rdparty/boost/libs/regex/src/posix_api.cpp
3rdparty/boost/libs/regex/src/regex.cpp

index 648a65e295c464ab1f26d03275e8cbcbcac7a170..3582dcc051b72a50f586e986deeb1041c48df14f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-(c) 2014 Glen Joseph Fernandes
+(c) 2014-2015 Glen Joseph Fernandes
 <glenjofe -at- gmail.com>
 
 Distributed under the Boost Software
diff --git a/3rdparty/boost/boost/align/detail/address.hpp b/3rdparty/boost/boost/align/detail/address.hpp
deleted file mode 100644 (file)
index b38e571..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-(c) 2014 Glen Joseph Fernandes
-<glenjofe -at- gmail.com>
-
-Distributed under the Boost Software
-License, Version 1.0.
-http://boost.org/LICENSE_1_0.txt
-*/
-#ifndef BOOST_ALIGN_DETAIL_ADDRESS_HPP
-#define BOOST_ALIGN_DETAIL_ADDRESS_HPP
-
-#include <boost/cstdint.hpp>
-#include <cstddef>
-
-namespace boost {
-namespace alignment {
-namespace detail {
-
-#if defined(BOOST_HAS_INTPTR_T)
-typedef boost::uintptr_t address;
-#else
-typedef std::size_t address;
-#endif
-
-} /* .detail */
-} /* .alignment */
-} /* .boost */
-
-#endif
index d2404b3e6d1181fa913f6da8749cad6801d2ed01..0828c58365efd11702bfdeeb3f912b4dc6fa1085 100644 (file)
@@ -9,10 +9,8 @@ http://boost.org/LICENSE_1_0.txt
 #ifndef BOOST_ALIGN_DETAIL_ALIGN_HPP
 #define BOOST_ALIGN_DETAIL_ALIGN_HPP
 
-#include <boost/assert.hpp>
-#include <boost/align/detail/address.hpp>
 #include <boost/align/detail/is_alignment.hpp>
-#include <cstddef>
+#include <boost/assert.hpp>
 
 namespace boost {
 namespace alignment {
@@ -21,17 +19,17 @@ inline void* align(std::size_t alignment, std::size_t size,
     void*& ptr, std::size_t& space)
 {
     BOOST_ASSERT(detail::is_alignment(alignment));
-    std::size_t n = detail::address(ptr) & (alignment - 1);
-    if (n != 0) {
-        n = alignment - n;
-    }
-    void* p = 0;
-    if (n <= space && size <= space - n) {
-        p = static_cast<char*>(ptr) + n;
-        ptr = p;
-        space -= n;
+    if (size <= space) {
+        char* p = reinterpret_cast<char*>((reinterpret_cast<std::
+            size_t>(ptr) + alignment - 1) & ~(alignment - 1));
+        std::ptrdiff_t n = p - static_cast<char*>(ptr);
+        if (size <= space - n) {
+            ptr = p;
+            space -= n;
+            return p;
+        }
     }
-    return p;
+    return 0;
 }
 
 } /* .alignment */
diff --git a/3rdparty/boost/boost/bind.hpp b/3rdparty/boost/boost/bind.hpp
deleted file mode 100644 (file)
index 450120c..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef BOOST_BIND_HPP_INCLUDED
-#define BOOST_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) 2009, 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 <boost/bind/bind.hpp>
-
-#ifndef BOOST_BIND_NO_PLACEHOLDERS
-
-#if defined(BOOST_CLANG)
-# pragma clang diagnostic push
-# if  __has_warning("-Wheader-hygiene")
-#  pragma clang diagnostic ignored "-Wheader-hygiene"
-# endif
-#endif
-
-using namespace boost::placeholders;
-
-#if defined(BOOST_CLANG)
-# pragma clang diagnostic pop
-#endif
-
-#endif // #ifndef BOOST_BIND_NO_PLACEHOLDERS
-
-#endif // #ifndef BOOST_BIND_HPP_INCLUDED
diff --git a/3rdparty/boost/boost/bind/arg.hpp b/3rdparty/boost/boost/bind/arg.hpp
deleted file mode 100644 (file)
index a74b829..0000000
+++ /dev/null
@@ -1,62 +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 <boost/config.hpp>
-#include <boost/is_placeholder.hpp>
-#include <boost/static_assert.hpp>
-
-namespace boost
-{
-
-template< int I > struct arg
-{
-    BOOST_CONSTEXPR arg()
-    {
-    }
-
-    template< class T > BOOST_CONSTEXPR arg( T const & /* t */ )
-    {
-        BOOST_STATIC_ASSERT( I == is_placeholder<T>::value );
-    }
-};
-
-template< int I > BOOST_CONSTEXPR bool operator==( arg<I> const &, arg<I> const & )
-{
-    return true;
-}
-
-#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-
-template< int I > struct is_placeholder< arg<I> >
-{
-    enum _vt { value = I };
-};
-
-template< int I > struct is_placeholder< arg<I> (*) () >
-{
-    enum _vt { value = I };
-};
-
-#endif
-
-} // namespace boost
-
-#endif // #ifndef BOOST_BIND_ARG_HPP_INCLUDED
diff --git a/3rdparty/boost/boost/bind/bind.hpp b/3rdparty/boost/boost/bind/bind.hpp
deleted file mode 100644 (file)
index f793551..0000000
+++ /dev/null
@@ -1,2256 +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 <boost/config.hpp>
-#include <boost/ref.hpp>
-#include <boost/mem_fn.hpp>
-#include <boost/type.hpp>
-#include <boost/is_placeholder.hpp>
-#include <boost/bind/arg.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/visit_each.hpp>
-#include <boost/core/enable_if.hpp>
-#include <boost/core/is_same.hpp>
-
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-#include <utility> // std::forward
-#endif
-
-// Borland-specific bug, visit_each() silently fails to produce code
-
-#if defined(__BORLANDC__)
-#  define BOOST_BIND_VISIT_EACH boost::visit_each
-#else
-#  define BOOST_BIND_VISIT_EACH visit_each
-#endif
-
-#include <boost/bind/storage.hpp>
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4512) // assignment operator could not be generated
-#endif
-
-namespace boost
-{
-
-template<class T> class weak_ptr;
-
-namespace _bi // implementation details
-{
-
-// result_traits
-
-template<class R, class F> struct result_traits
-{
-    typedef R type;
-};
-
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
-
-struct unspecified {};
-
-template<class F> struct result_traits<unspecified, F>
-{
-    typedef typename F::result_type type;
-};
-
-template<class F> struct result_traits< unspecified, reference_wrapper<F> >
-{
-    typedef typename F::result_type type;
-};
-
-#endif
-
-// ref_compare
-
-template<class T> bool ref_compare( T const & a, T const & b, long )
-{
-    return a == b;
-}
-
-template<int I> bool ref_compare( arg<I> const &, arg<I> const &, int )
-{
-    return true;
-}
-
-template<int I> bool ref_compare( arg<I> (*) (), arg<I> (*) (), int )
-{
-    return true;
-}
-
-template<class T> bool ref_compare( reference_wrapper<T> const & a, reference_wrapper<T> const & b, int )
-{
-    return a.get_pointer() == b.get_pointer();
-}
-
-// bind_t forward declaration for listN
-
-template<class R, class F, class L> class bind_t;
-
-template<class R, class F, class L> bool ref_compare( bind_t<R, F, L> const & a, bind_t<R, F, L> const & b, int )
-{
-    return a.compare( b );
-}
-
-// value
-
-template<class T> 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<class T> bool ref_compare( value< weak_ptr<T> > const & a, value< weak_ptr<T> > const & b, int )
-{
-    return !(a.get() < b.get()) && !(b.get() < a.get());
-}
-
-// type
-
-template<class T> class type {};
-
-// unwrap
-
-template<class F> struct unwrapper
-{
-    static inline F & unwrap( F & f, long )
-    {
-        return f;
-    }
-
-    template<class F2> static inline F2 & unwrap( reference_wrapper<F2> rf, int )
-    {
-        return rf.get();
-    }
-
-    template<class R, class T> static inline _mfi::dm<R, T> unwrap( R T::* pm, int )
-    {
-        return _mfi::dm<R, T>( pm );
-    }
-};
-
-// listN
-
-class list0
-{
-public:
-
-    list0() {}
-
-    template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
-
-    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-
-    template<class R, class F, class A> R operator()(type<R>, F & f, A &, long)
-    {
-        return unwrapper<F>::unwrap(f, 0)();
-    }
-
-    template<class R, class F, class A> R operator()(type<R>, F const & f, A &, long) const
-    {
-        return unwrapper<F const>::unwrap(f, 0)();
-    }
-
-    template<class F, class A> void operator()(type<void>, F & f, A &, int)
-    {
-        unwrapper<F>::unwrap(f, 0)();
-    }
-
-    template<class F, class A> void operator()(type<void>, F const & f, A &, int) const
-    {
-        unwrapper<F const>::unwrap(f, 0)();
-    }
-
-    template<class V> 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<class T> T & operator[] ( _bi::value<T> & v ) const { return v.get(); }
-
-    template<class T> T const & operator[] ( _bi::value<T> const & v ) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-
-    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
-    {
-        return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_]);
-    }
-
-    template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
-    {
-        return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_]);
-    }
-
-    template<class F, class A> void operator()(type<void>, F & f, A & a, int)
-    {
-        unwrapper<F>::unwrap(f, 0)(a[base_type::a1_]);
-    }
-
-    template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
-    {
-        unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_]);
-    }
-
-    template<class V> 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<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
-
-    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-
-    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
-    {
-        return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]);
-    }
-
-    template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
-    {
-        return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]);
-    }
-
-    template<class F, class A> void operator()(type<void>, F & f, A & a, int)
-    {
-        unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]);
-    }
-
-    template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
-    {
-        unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]);
-    }
-
-    template<class A> bool operator()( type<bool>, logical_and & /*f*/, A & a, int )
-    {
-        return a[ base_type::a1_ ] && a[ base_type::a2_ ];
-    }
-
-    template<class A> bool operator()( type<bool>, logical_and const & /*f*/, A & a, int ) const
-    {
-        return a[ base_type::a1_ ] && a[ base_type::a2_ ];
-    }
-
-    template<class A> bool operator()( type<bool>, logical_or & /*f*/, A & a, int )
-    {
-        return a[ base_type::a1_ ] || a[ base_type::a2_ ];
-    }
-
-    template<class A> bool operator()( type<bool>, logical_or const & /*f*/, A & a, int ) const
-    {
-        return a[ base_type::a1_ ] || a[ base_type::a2_ ];
-    }
-
-    template<class V> 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<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
-
-    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-
-    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
-    {
-        return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]);
-    }
-
-    template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
-    {
-        return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]);
-    }
-
-    template<class F, class A> void operator()(type<void>, F & f, A & a, int)
-    {
-        unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]);
-    }
-
-    template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
-    {
-        unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]);
-    }
-
-    template<class V> 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<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
-
-    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-
-    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
-    {
-        return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]);
-    }
-
-    template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
-    {
-        return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]);
-    }
-
-    template<class F, class A> void operator()(type<void>, F & f, A & a, int)
-    {
-        unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]);
-    }
-
-    template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
-    {
-        unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]);
-    }
-
-    template<class V> 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<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
-
-    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-
-    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
-    {
-        return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]);
-    }
-
-    template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
-    {
-        return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]);
-    }
-
-    template<class F, class A> void operator()(type<void>, F & f, A & a, int)
-    {
-        unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]);
-    }
-
-    template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
-    {
-        unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]);
-    }
-
-    template<class V> 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 A1, class A2, class A3, class A4, class A5, class A6> 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<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
-
-    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-
-    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
-    {
-        return unwrapper<F>::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<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
-    {
-        return unwrapper<F const>::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<class F, class A> void operator()(type<void>, F & f, A & a, int)
-    {
-        unwrapper<F>::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<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
-    {
-        unwrapper<F const>::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<class V> 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 A1, class A2, class A3, class A4, class A5, class A6, class A7> 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<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
-
-    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-
-    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
-    {
-        return unwrapper<F>::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<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
-    {
-        return unwrapper<F const>::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<class F, class A> void operator()(type<void>, F & f, A & a, int)
-    {
-        unwrapper<F>::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<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
-    {
-        unwrapper<F const>::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<class V> 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<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
-
-    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-
-    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
-    {
-        return unwrapper<F>::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<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
-    {
-        return unwrapper<F const>::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<class F, class A> void operator()(type<void>, F & f, A & a, int)
-    {
-        unwrapper<F>::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<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
-    {
-        unwrapper<F const>::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<class V> 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 A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> 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<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
-
-    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-
-    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
-    {
-        return unwrapper<F>::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<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
-    {
-        return unwrapper<F const>::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<class F, class A> void operator()(type<void>, F & f, A & a, int)
-    {
-        unwrapper<F>::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<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
-    {
-        unwrapper<F const>::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<class V> 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 )
-
-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>( a1_ ); } // not static_cast because of g++ 4.9
-
-    A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward<A1>( a1_ ); }
-
-    template<class T> T & operator[] ( _bi::value<T> & v ) const { return v.get(); }
-
-    template<class T> T const & operator[] ( _bi::value<T> const & v ) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-};
-
-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>( a1_ ); }
-    A2 && operator[] (boost::arg<2>) const { return std::forward<A2>( a2_ ); }
-
-    A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward<A1>( a1_ ); }
-    A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward<A2>( a2_ ); }
-
-    template<class T> T & operator[] ( _bi::value<T> & v ) const { return v.get(); }
-
-    template<class T> T const & operator[] ( _bi::value<T> const & v ) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-};
-
-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>( a1_ ); }
-    A2 && operator[] (boost::arg<2>) const { return std::forward<A2>( a2_ ); }
-    A3 && operator[] (boost::arg<3>) const { return std::forward<A3>( a3_ ); }
-
-    A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward<A1>( a1_ ); }
-    A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward<A2>( a2_ ); }
-    A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward<A3>( a3_ ); }
-
-    template<class T> T & operator[] ( _bi::value<T> & v ) const { return v.get(); }
-
-    template<class T> T const & operator[] ( _bi::value<T> const & v ) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-};
-
-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>( a1_ ); }
-    A2 && operator[] (boost::arg<2>) const { return std::forward<A2>( a2_ ); }
-    A3 && operator[] (boost::arg<3>) const { return std::forward<A3>( a3_ ); }
-    A4 && operator[] (boost::arg<4>) const { return std::forward<A4>( a4_ ); }
-
-    A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward<A1>( a1_ ); }
-    A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward<A2>( a2_ ); }
-    A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward<A3>( a3_ ); }
-    A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward<A4>( a4_ ); }
-
-    template<class T> T & operator[] ( _bi::value<T> & v ) const { return v.get(); }
-
-    template<class T> T const & operator[] ( _bi::value<T> const & v ) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-};
-
-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>( a1_ ); }
-    A2 && operator[] (boost::arg<2>) const { return std::forward<A2>( a2_ ); }
-    A3 && operator[] (boost::arg<3>) const { return std::forward<A3>( a3_ ); }
-    A4 && operator[] (boost::arg<4>) const { return std::forward<A4>( a4_ ); }
-    A5 && operator[] (boost::arg<5>) const { return std::forward<A5>( a5_ ); }
-
-    A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward<A1>( a1_ ); }
-    A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward<A2>( a2_ ); }
-    A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward<A3>( a3_ ); }
-    A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward<A4>( a4_ ); }
-    A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward<A5>( a5_ ); }
-
-    template<class T> T & operator[] ( _bi::value<T> & v ) const { return v.get(); }
-
-    template<class T> T const & operator[] ( _bi::value<T> const & v ) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-};
-
-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>( a1_ ); }
-    A2 && operator[] (boost::arg<2>) const { return std::forward<A2>( a2_ ); }
-    A3 && operator[] (boost::arg<3>) const { return std::forward<A3>( a3_ ); }
-    A4 && operator[] (boost::arg<4>) const { return std::forward<A4>( a4_ ); }
-    A5 && operator[] (boost::arg<5>) const { return std::forward<A5>( a5_ ); }
-    A6 && operator[] (boost::arg<6>) const { return std::forward<A6>( a6_ ); }
-
-    A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward<A1>( a1_ ); }
-    A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward<A2>( a2_ ); }
-    A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward<A3>( a3_ ); }
-    A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward<A4>( a4_ ); }
-    A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward<A5>( a5_ ); }
-    A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward<A6>( a6_ ); }
-
-    template<class T> T & operator[] ( _bi::value<T> & v ) const { return v.get(); }
-
-    template<class T> T const & operator[] ( _bi::value<T> const & v ) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-};
-
-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>( a1_ ); }
-    A2 && operator[] (boost::arg<2>) const { return std::forward<A2>( a2_ ); }
-    A3 && operator[] (boost::arg<3>) const { return std::forward<A3>( a3_ ); }
-    A4 && operator[] (boost::arg<4>) const { return std::forward<A4>( a4_ ); }
-    A5 && operator[] (boost::arg<5>) const { return std::forward<A5>( a5_ ); }
-    A6 && operator[] (boost::arg<6>) const { return std::forward<A6>( a6_ ); }
-    A7 && operator[] (boost::arg<7>) const { return std::forward<A7>( a7_ ); }
-
-    A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward<A1>( a1_ ); }
-    A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward<A2>( a2_ ); }
-    A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward<A3>( a3_ ); }
-    A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward<A4>( a4_ ); }
-    A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward<A5>( a5_ ); }
-    A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward<A6>( a6_ ); }
-    A7 && operator[] (boost::arg<7> (*) ()) const { return std::forward<A7>( a7_ ); }
-
-    template<class T> T & operator[] ( _bi::value<T> & v ) const { return v.get(); }
-
-    template<class T> T const & operator[] ( _bi::value<T> const & v ) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-};
-
-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>( a1_ ); }
-    A2 && operator[] (boost::arg<2>) const { return std::forward<A2>( a2_ ); }
-    A3 && operator[] (boost::arg<3>) const { return std::forward<A3>( a3_ ); }
-    A4 && operator[] (boost::arg<4>) const { return std::forward<A4>( a4_ ); }
-    A5 && operator[] (boost::arg<5>) const { return std::forward<A5>( a5_ ); }
-    A6 && operator[] (boost::arg<6>) const { return std::forward<A6>( a6_ ); }
-    A7 && operator[] (boost::arg<7>) const { return std::forward<A7>( a7_ ); }
-    A8 && operator[] (boost::arg<8>) const { return std::forward<A8>( a8_ ); }
-
-    A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward<A1>( a1_ ); }
-    A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward<A2>( a2_ ); }
-    A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward<A3>( a3_ ); }
-    A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward<A4>( a4_ ); }
-    A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward<A5>( a5_ ); }
-    A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward<A6>( a6_ ); }
-    A7 && operator[] (boost::arg<7> (*) ()) const { return std::forward<A7>( a7_ ); }
-    A8 && operator[] (boost::arg<8> (*) ()) const { return std::forward<A8>( a8_ ); }
-
-    template<class T> T & operator[] ( _bi::value<T> & v ) const { return v.get(); }
-
-    template<class T> T const & operator[] ( _bi::value<T> const & v ) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-};
-
-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>( a1_ ); }
-    A2 && operator[] (boost::arg<2>) const { return std::forward<A2>( a2_ ); }
-    A3 && operator[] (boost::arg<3>) const { return std::forward<A3>( a3_ ); }
-    A4 && operator[] (boost::arg<4>) const { return std::forward<A4>( a4_ ); }
-    A5 && operator[] (boost::arg<5>) const { return std::forward<A5>( a5_ ); }
-    A6 && operator[] (boost::arg<6>) const { return std::forward<A6>( a6_ ); }
-    A7 && operator[] (boost::arg<7>) const { return std::forward<A7>( a7_ ); }
-    A8 && operator[] (boost::arg<8>) const { return std::forward<A8>( a8_ ); }
-    A9 && operator[] (boost::arg<9>) const { return std::forward<A9>( a9_ ); }
-
-    A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward<A1>( a1_ ); }
-    A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward<A2>( a2_ ); }
-    A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward<A3>( a3_ ); }
-    A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward<A4>( a4_ ); }
-    A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward<A5>( a5_ ); }
-    A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward<A6>( a6_ ); }
-    A7 && operator[] (boost::arg<7> (*) ()) const { return std::forward<A7>( a7_ ); }
-    A8 && operator[] (boost::arg<8> (*) ()) const { return std::forward<A8>( a8_ ); }
-    A9 && operator[] (boost::arg<9> (*) ()) const { return std::forward<A9>( a9_ ); }
-
-    template<class T> T & operator[] ( _bi::value<T> & v ) const { return v.get(); }
-
-    template<class T> T const & operator[] ( _bi::value<T> const & v ) const { return v.get(); }
-
-    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
-
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
-};
-
-template<class R, class F, class L> class bind_t
-{
-private:
-
-    F f_;
-    L l_;
-
-public:
-
-    typedef typename result_traits<R, F>::type result_type;
-    typedef bind_t this_type;
-
-    bind_t( F f, L const & l ): f_( f ), l_( l ) {}
-
-    //
-
-    result_type operator()()
-    {
-        list0 a;
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    result_type operator()() const
-    {
-        list0 a;
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1> result_type operator()( A1 && a1 )
-    {
-        rrlist1< A1 > a( a1 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1> result_type operator()( A1 && a1 ) const
-    {
-        rrlist1< A1 > a( a1 );
-        return l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2> result_type operator()( A1 && a1, A2 && a2 )
-    {
-        rrlist2< A1, A2 > a( a1, a2 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2> result_type operator()( A1 && a1, A2 && a2 ) const
-    {
-        rrlist2< A1, A2 > a( a1, a2 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2, class A3> result_type operator()( A1 && a1, A2 && a2, A3 && a3 )
-    {
-        rrlist3< A1, A2, A3 > a( a1, a2, a3 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2, class A3> result_type operator()( A1 && a1, A2 && a2, A3 && a3 ) const
-    {
-        rrlist3< A1, A2, A3 > a( a1, a2, a3 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2, class A3, class A4> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4 )
-    {
-        rrlist4< A1, A2, A3, A4 > a( a1, a2, a3, a4 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2, class A3, class A4> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) const
-    {
-        rrlist4< A1, A2, A3, A4 > a( a1, a2, a3, a4 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 )
-    {
-        rrlist5< A1, A2, A3, A4, A5 > a( a1, a2, a3, a4, a5 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) const
-    {
-        rrlist5< A1, A2, A3, A4, A5 > a( a1, a2, a3, a4, a5 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 )
-    {
-        rrlist6< A1, A2, A3, A4, A5, A6 > a( a1, a2, a3, a4, a5, a6 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) const
-    {
-        rrlist6< A1, A2, A3, A4, A5, A6 > a( a1, a2, a3, a4, a5, a6 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 )
-    {
-        rrlist7< A1, A2, A3, A4, A5, A6, A7 > a( a1, a2, a3, a4, a5, a6, a7 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) const
-    {
-        rrlist7< A1, A2, A3, A4, A5, A6, A7 > a( a1, a2, a3, a4, a5, a6, a7 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 )
-    {
-        rrlist8< A1, A2, A3, A4, A5, A6, A7, A8 > a( a1, a2, a3, a4, a5, a6, a7, a8 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) const
-    {
-        rrlist8< A1, A2, A3, A4, A5, A6, A7, A8 > a( a1, a2, a3, a4, a5, a6, a7, a8 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 )
-    {
-        rrlist9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > a( a1, a2, a3, a4, a5, a6, a7, a8, a9 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) const
-    {
-        rrlist9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > a( a1, a2, a3, a4, a5, a6, a7, a8, a9 );
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    //
-
-    template<class A> result_type eval( A & a )
-    {
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class A> result_type eval( A & a ) const
-    {
-        return l_( type<result_type>(), f_, a, 0 );
-    }
-
-    template<class V> void accept( V & v ) const
-    {
-#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ )
-        using boost::visit_each;
-#endif
-
-        BOOST_BIND_VISIT_EACH( v, f_, 0 );
-        l_.accept( v );
-    }
-
-    bool compare( this_type const & rhs ) const
-    {
-        return ref_compare( f_, rhs.f_, 0 ) && l_ == rhs.l_;
-    }
-};
-
-#elif !defined( BOOST_NO_VOID_RETURNS )
-
-template<class R, class F, class L> class bind_t
-{
-public:
-
-    typedef bind_t this_type;
-
-    bind_t(F f, L const & l): f_(f), l_(l) {}
-
-#define BOOST_BIND_RETURN return
-#include <boost/bind/bind_template.hpp>
-#undef BOOST_BIND_RETURN
-
-};
-
-#else // no void returns
-
-template<class R> struct bind_t_generator
-{
-
-template<class F, class L> class implementation
-{
-public:
-
-    typedef implementation this_type;
-
-    implementation(F f, L const & l): f_(f), l_(l) {}
-
-#define BOOST_BIND_RETURN return
-#include <boost/bind/bind_template.hpp>
-#undef BOOST_BIND_RETURN
-
-};
-
-};
-
-template<> struct bind_t_generator<void>
-{
-
-template<class F, class L> 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 <boost/bind/bind_template.hpp>
-#undef BOOST_BIND_RETURN
-
-};
-
-};
-
-template<class R2, class F, class L> class bind_t: public bind_t_generator<R2>::BOOST_NESTED_TEMPLATE implementation<F, L>
-{
-public:
-
-    bind_t(F f, L const & l): bind_t_generator<R2>::BOOST_NESTED_TEMPLATE implementation<F, L>(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<class R, class F, class L> bool function_equal( bind_t<R, F, L> const & a, bind_t<R, F, L> const & b )
-{
-    return a.compare(b);
-}
-
-# else
-
-template<class R, class F, class L> bool function_equal_impl( bind_t<R, F, L> const & a, bind_t<R, F, L> 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<class R, class F, class L> bool function_equal( _bi::bind_t<R, F, L> const & a, _bi::bind_t<R, F, L> const & b )
-{
-    return a.compare(b);
-}
-
-# else
-
-template<class R, class F, class L> bool function_equal_impl( _bi::bind_t<R, F, L> const & a, _bi::bind_t<R, F, L> 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( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x582) )
-
-template<class T> struct add_value
-{
-    typedef _bi::value<T> type;
-};
-
-#else
-
-template< class T, int I > struct add_value_2
-{
-    typedef boost::arg<I> type;
-};
-
-template< class T > struct add_value_2< T, 0 >
-{
-    typedef _bi::value< T > type;
-};
-
-template<class T> struct add_value
-{
-    typedef typename add_value_2< T, boost::is_placeholder< T >::value >::type type;
-};
-
-#endif
-
-template<class T> struct add_value< value<T> >
-{
-    typedef _bi::value<T> type;
-};
-
-template<class T> struct add_value< reference_wrapper<T> >
-{
-    typedef reference_wrapper<T> type;
-};
-
-template<int I> struct add_value< arg<I> >
-{
-    typedef boost::arg<I> type;
-};
-
-template<int I> struct add_value< arg<I> (*) () >
-{
-    typedef boost::arg<I> (*type) ();
-};
-
-template<class R, class F, class L> struct add_value< bind_t<R, F, L> >
-{
-    typedef bind_t<R, F, L> type;
-};
-
-#else
-
-template<int I> struct _avt_0;
-
-template<> struct _avt_0<1>
-{
-    template<class T> struct inner
-    {
-        typedef T type;
-    };
-};
-
-template<> struct _avt_0<2>
-{
-    template<class T> struct inner
-    {
-        typedef value<T> type;
-    };
-};
-
-typedef char (&_avt_r1) [1];
-typedef char (&_avt_r2) [2];
-
-template<class T> _avt_r1 _avt_f(value<T>);
-template<class T> _avt_r1 _avt_f(reference_wrapper<T>);
-template<int I> _avt_r1 _avt_f(arg<I>);
-template<int I> _avt_r1 _avt_f(arg<I> (*) ());
-template<class R, class F, class L> _avt_r1 _avt_f(bind_t<R, F, L>);
-
-_avt_r2 _avt_f(...);
-
-template<class T> struct add_value
-{
-    static T t();
-    typedef typename _avt_0<sizeof(_avt_f(t()))>::template inner<T>::type type;
-};
-
-#endif
-
-// list_av_N
-
-template<class A1> struct list_av_1
-{
-    typedef typename add_value<A1>::type B1;
-    typedef list1<B1> type;
-};
-
-template<class A1, class A2> struct list_av_2
-{
-    typedef typename add_value<A1>::type B1;
-    typedef typename add_value<A2>::type B2;
-    typedef list2<B1, B2> type;
-};
-
-template<class A1, class A2, class A3> struct list_av_3
-{
-    typedef typename add_value<A1>::type B1;
-    typedef typename add_value<A2>::type B2;
-    typedef typename add_value<A3>::type B3;
-    typedef list3<B1, B2, B3> type;
-};
-
-template<class A1, class A2, class A3, class A4> struct list_av_4
-{
-    typedef typename add_value<A1>::type B1;
-    typedef typename add_value<A2>::type B2;
-    typedef typename add_value<A3>::type B3;
-    typedef typename add_value<A4>::type B4;
-    typedef list4<B1, B2, B3, B4> type;
-};
-
-template<class A1, class A2, class A3, class A4, class A5> struct list_av_5
-{
-    typedef typename add_value<A1>::type B1;
-    typedef typename add_value<A2>::type B2;
-    typedef typename add_value<A3>::type B3;
-    typedef typename add_value<A4>::type B4;
-    typedef typename add_value<A5>::type B5;
-    typedef list5<B1, B2, B3, B4, B5> type;
-};
-
-template<class A1, class A2, class A3, class A4, class A5, class A6> struct list_av_6
-{
-    typedef typename add_value<A1>::type B1;
-    typedef typename add_value<A2>::type B2;
-    typedef typename add_value<A3>::type B3;
-    typedef typename add_value<A4>::type B4;
-    typedef typename add_value<A5>::type B5;
-    typedef typename add_value<A6>::type B6;
-    typedef list6<B1, B2, B3, B4, B5, B6> type;
-};
-
-template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> struct list_av_7
-{
-    typedef typename add_value<A1>::type B1;
-    typedef typename add_value<A2>::type B2;
-    typedef typename add_value<A3>::type B3;
-    typedef typename add_value<A4>::type B4;
-    typedef typename add_value<A5>::type B5;
-    typedef typename add_value<A6>::type B6;
-    typedef typename add_value<A7>::type B7;
-    typedef list7<B1, B2, B3, B4, B5, B6, B7> type;
-};
-
-template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> struct list_av_8
-{
-    typedef typename add_value<A1>::type B1;
-    typedef typename add_value<A2>::type B2;
-    typedef typename add_value<A3>::type B3;
-    typedef typename add_value<A4>::type B4;
-    typedef typename add_value<A5>::type B5;
-    typedef typename add_value<A6>::type B6;
-    typedef typename add_value<A7>::type B7;
-    typedef typename add_value<A8>::type B8;
-    typedef list8<B1, B2, B3, B4, B5, B6, B7, B8> type;
-};
-
-template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> struct list_av_9
-{
-    typedef typename add_value<A1>::type B1;
-    typedef typename add_value<A2>::type B2;
-    typedef typename add_value<A3>::type B3;
-    typedef typename add_value<A4>::type B4;
-    typedef typename add_value<A5>::type B5;
-    typedef typename add_value<A6>::type B6;
-    typedef typename add_value<A7>::type B7;
-    typedef typename add_value<A8>::type B8;
-    typedef typename add_value<A9>::type B9;
-    typedef list9<B1, B2, B3, B4, B5, B6, B7, B8, B9> type;
-};
-
-// operator!
-
-struct logical_not
-{
-    template<class V> bool operator()(V const & v) const { return !v; }
-};
-
-template<class R, class F, class L>
-    bind_t< bool, logical_not, list1< bind_t<R, F, L> > >
-    operator! (bind_t<R, F, L> const & f)
-{
-    typedef list1< bind_t<R, F, L> > list_type;
-    return bind_t<bool, logical_not, list_type> ( logical_not(), list_type(f) );
-}
-
-// relational operators
-
-#define BOOST_BIND_OPERATOR( op, name ) \
-\
-struct name \
-{ \
-    template<class V, class W> bool operator()(V const & v, W const & w) const { return v op w; } \
-}; \
- \
-template<class R, class F, class L, class A2> \
-    bind_t< bool, name, list2< bind_t<R, F, L>, typename add_value<A2>::type > > \
-    operator op (bind_t<R, F, L> const & f, A2 a2) \
-{ \
-    typedef typename add_value<A2>::type B2; \
-    typedef list2< bind_t<R, F, L>, B2> list_type; \
-    return bind_t<bool, name, list_type> ( 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<class R, class F, class L> \
-    bind_t< bool, name, list2< bind_t<R, F, L>, bind_t<R, F, L> > > \
-    operator op (bind_t<R, F, L> const & f, bind_t<R, F, L> const & g) \
-{ \
-    typedef list2< bind_t<R, F, L>, bind_t<R, F, L> > list_type; \
-    return bind_t<bool, name, list_type> ( 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( __BORLANDC__ ) \
-   && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3)
-
-template<class V, class T> void visit_each( V & v, value<T> const & t, int )
-{
-    using boost::visit_each;
-    BOOST_BIND_VISIT_EACH( v, t.get(), 0 );
-}
-
-template<class V, class R, class F, class L> void visit_each( V & v, bind_t<R, F, L> const & t, int )
-{
-    t.accept( v );
-}
-
-#endif
-
-} // namespace _bi
-
-// visit_each, no ADL
-
-#if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) || defined( __BORLANDC__ ) \
-  || (defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3)
-
-template<class V, class T> void visit_each( V & v, _bi::value<T> const & t, int )
-{
-    BOOST_BIND_VISIT_EACH( v, t.get(), 0 );
-}
-
-template<class V, class R, class F, class L> void visit_each( V & v, _bi::bind_t<R, F, L> 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<class R, class F>
-    _bi::bind_t<R, F, _bi::list0>
-    BOOST_BIND(F f)
-{
-    typedef _bi::list0 list_type;
-    return _bi::bind_t<R, F, list_type> (f, list_type());
-}
-
-template<class R, class F, class A1>
-    _bi::bind_t<R, F, typename _bi::list_av_1<A1>::type>
-    BOOST_BIND(F f, A1 a1)
-{
-    typedef typename _bi::list_av_1<A1>::type list_type;
-    return _bi::bind_t<R, F, list_type> (f, list_type(a1));
-}
-
-template<class R, class F, class A1, class A2>
-    _bi::bind_t<R, F, typename _bi::list_av_2<A1, A2>::type>
-    BOOST_BIND(F f, A1 a1, A2 a2)
-{
-    typedef typename _bi::list_av_2<A1, A2>::type list_type;
-    return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2));
-}
-
-template<class R, class F, class A1, class A2, class A3>
-    _bi::bind_t<R, F, typename _bi::list_av_3<A1, A2, A3>::type>
-    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3)
-{
-    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
-}
-
-template<class R, class F, class A1, class A2, class A3, class A4>
-    _bi::bind_t<R, F, typename _bi::list_av_4<A1, A2, A3, A4>::type>
-    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4)
-{
-    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4));
-}
-
-template<class R, class F, class A1, class A2, class A3, class A4, class A5>
-    _bi::bind_t<R, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
-    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
-{
-    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
-}
-
-template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6>
-    _bi::bind_t<R, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
-    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
-{
-    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
-}
-
-template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
-    _bi::bind_t<R, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::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<A1, A2, A3, A4, A5, A6, A7>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
-}
-
-template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
-    _bi::bind_t<R, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::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<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
-}
-
-template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
-    _bi::bind_t<R, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::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<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
-}
-
-// generic function objects, alternative syntax
-
-template<class R, class F>
-    _bi::bind_t<R, F, _bi::list0>
-    BOOST_BIND(boost::type<R>, F f)
-{
-    typedef _bi::list0 list_type;
-    return _bi::bind_t<R, F, list_type> (f, list_type());
-}
-
-template<class R, class F, class A1>
-    _bi::bind_t<R, F, typename _bi::list_av_1<A1>::type>
-    BOOST_BIND(boost::type<R>, F f, A1 a1)
-{
-    typedef typename _bi::list_av_1<A1>::type list_type;
-    return _bi::bind_t<R, F, list_type> (f, list_type(a1));
-}
-
-template<class R, class F, class A1, class A2>
-    _bi::bind_t<R, F, typename _bi::list_av_2<A1, A2>::type>
-    BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2)
-{
-    typedef typename _bi::list_av_2<A1, A2>::type list_type;
-    return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2));
-}
-
-template<class R, class F, class A1, class A2, class A3>
-    _bi::bind_t<R, F, typename _bi::list_av_3<A1, A2, A3>::type>
-    BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3)
-{
-    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
-}
-
-template<class R, class F, class A1, class A2, class A3, class A4>
-    _bi::bind_t<R, F, typename _bi::list_av_4<A1, A2, A3, A4>::type>
-    BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4)
-{
-    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4));
-}
-
-template<class R, class F, class A1, class A2, class A3, class A4, class A5>
-    _bi::bind_t<R, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
-    BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
-{
-    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
-}
-
-template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6>
-    _bi::bind_t<R, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
-    BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
-{
-    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
-}
-
-template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
-    _bi::bind_t<R, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
-    BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
-{
-    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
-}
-
-template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
-    _bi::bind_t<R, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
-    BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
-{
-    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
-}
-
-template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
-    _bi::bind_t<R, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
-    BOOST_BIND(boost::type<R>, 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<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
-}
-
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
-
-// adaptable function objects
-
-template<class F>
-    _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<class F, class A1>
-    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_1<A1>::type>
-    BOOST_BIND(F f, A1 a1)
-{
-    typedef typename _bi::list_av_1<A1>::type list_type;
-    return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1));
-}
-
-template<class F, class A1, class A2>
-    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_2<A1, A2>::type>
-    BOOST_BIND(F f, A1 a1, A2 a2)
-{
-    typedef typename _bi::list_av_2<A1, A2>::type list_type;
-    return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1, a2));
-}
-
-template<class F, class A1, class A2, class A3>
-    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_3<A1, A2, A3>::type>
-    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3)
-{
-    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
-    return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3));
-}
-
-template<class F, class A1, class A2, class A3, class A4>
-    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_4<A1, A2, A3, A4>::type>
-    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4)
-{
-    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
-    return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4));
-}
-
-template<class F, class A1, class A2, class A3, class A4, class A5>
-    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
-    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
-{
-    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
-    return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
-}
-
-template<class F, class A1, class A2, class A3, class A4, class A5, class A6>
-    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
-    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
-{
-    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
-    return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
-}
-
-template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
-    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::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<A1, A2, A3, A4, A5, A6, A7>::type list_type;
-    return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
-}
-
-template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
-    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::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<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
-    return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
-}
-
-template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
-    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::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<A1, A2, A3, A4, A5, A6, A7, A8, A9>::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
-
-#include <boost/bind/bind_cc.hpp>
-
-#undef BOOST_BIND_CC
-#undef BOOST_BIND_ST
-
-#ifdef BOOST_BIND_ENABLE_STDCALL
-
-#define BOOST_BIND_CC __stdcall
-#define BOOST_BIND_ST
-
-#include <boost/bind/bind_cc.hpp>
-
-#undef BOOST_BIND_CC
-#undef BOOST_BIND_ST
-
-#endif
-
-#ifdef BOOST_BIND_ENABLE_FASTCALL
-
-#define BOOST_BIND_CC __fastcall
-#define BOOST_BIND_ST
-
-#include <boost/bind/bind_cc.hpp>
-
-#undef BOOST_BIND_CC
-#undef BOOST_BIND_ST
-
-#endif
-
-#ifdef BOOST_BIND_ENABLE_PASCAL
-
-#define BOOST_BIND_ST pascal
-#define BOOST_BIND_CC
-
-#include <boost/bind/bind_cc.hpp>
-
-#undef BOOST_BIND_ST
-#undef BOOST_BIND_CC
-
-#endif
-
-// member function pointers
-
-#define BOOST_BIND_MF_NAME(X) X
-#define BOOST_BIND_MF_CC
-
-#include <boost/bind/bind_mf_cc.hpp>
-#include <boost/bind/bind_mf2_cc.hpp>
-
-#undef BOOST_BIND_MF_NAME
-#undef BOOST_BIND_MF_CC
-
-#ifdef BOOST_MEM_FN_ENABLE_CDECL
-
-#define BOOST_BIND_MF_NAME(X) X##_cdecl
-#define BOOST_BIND_MF_CC __cdecl
-
-#include <boost/bind/bind_mf_cc.hpp>
-#include <boost/bind/bind_mf2_cc.hpp>
-
-#undef BOOST_BIND_MF_NAME
-#undef BOOST_BIND_MF_CC
-
-#endif
-
-#ifdef BOOST_MEM_FN_ENABLE_STDCALL
-
-#define BOOST_BIND_MF_NAME(X) X##_stdcall
-#define BOOST_BIND_MF_CC __stdcall
-
-#include <boost/bind/bind_mf_cc.hpp>
-#include <boost/bind/bind_mf2_cc.hpp>
-
-#undef BOOST_BIND_MF_NAME
-#undef BOOST_BIND_MF_CC
-
-#endif
-
-#ifdef BOOST_MEM_FN_ENABLE_FASTCALL
-
-#define BOOST_BIND_MF_NAME(X) X##_fastcall
-#define BOOST_BIND_MF_CC __fastcall
-
-#include <boost/bind/bind_mf_cc.hpp>
-#include <boost/bind/bind_mf2_cc.hpp>
-
-#undef BOOST_BIND_MF_NAME
-#undef BOOST_BIND_MF_CC
-
-#endif
-
-// data member pointers
-
-#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
-    || ( defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x620 ) ) )
-
-template<class R, class T, class A1>
-_bi::bind_t< R, _mfi::dm<R, T>, typename _bi::list_av_1<A1>::type >
-    BOOST_BIND(R T::*f, A1 a1)
-{
-    typedef _mfi::dm<R, T> F;
-    typedef typename _bi::list_av_1<A1>::type list_type;
-    return _bi::bind_t<R, F, list_type>( 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;
-};
-
-#endif // __IBMCPP__
-
-template<class R> struct isref
-{
-    enum value_type { value = 0 };
-};
-
-template<class R> struct isref< R& >
-{
-    enum value_type { value = 1 };
-};
-
-template<class R> struct isref< R* >
-{
-    enum value_type { value = 1 };
-};
-
-template<class Pm, class A1> struct dm_result
-{
-    typedef typename add_cref< Pm, 1 >::type type;
-};
-
-template<class Pm, class R, class F, class L> struct dm_result< Pm, bind_t<R, F, L> >
-{
-    typedef typename bind_t<R, F, L>::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<M, T>,
-    typename _bi::list_av_1<A1>::type
->
-
-BOOST_BIND( M T::*f, A1 a1 )
-{
-    typedef typename _bi::dm_result< M T::*, A1 >::type result_type;
-    typedef _mfi::dm<M, T> F;
-    typedef typename _bi::list_av_1<A1>::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 <boost/bind/placeholders.hpp>
-
-#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/3rdparty/boost/boost/bind/bind_cc.hpp b/3rdparty/boost/boost/bind/bind_cc.hpp
deleted file mode 100644 (file)
index 35f8ece..0000000
+++ /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<class R>
-    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (), _bi::list0>
-    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) ())
-{
-    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) ();
-    typedef _bi::list0 list_type;
-    return _bi::bind_t<R, F, list_type> (f, list_type());
-}
-
-template<class R, class B1, class A1>
-    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1), typename _bi::list_av_1<A1>::type>
-    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1), A1 a1)
-{
-    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1);
-    typedef typename _bi::list_av_1<A1>::type list_type;
-    return _bi::bind_t<R, F, list_type> (f, list_type(a1));
-}
-
-template<class R, class B1, class B2, class A1, class A2>
-    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2), typename _bi::list_av_2<A1, A2>::type>
-    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2), A1 a1, A2 a2)
-{
-    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2);
-    typedef typename _bi::list_av_2<A1, A2>::type list_type;
-    return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2));
-}
-
-template<class R,
-    class B1, class B2, class B3,
-    class A1, class A2, class A3>
-    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3), typename _bi::list_av_3<A1, A2, A3>::type>
-    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3)
-{
-    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3);
-    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
-}
-
-template<class R,
-    class B1, class B2, class B3, class B4,
-    class A1, class A2, class A3, class A4>
-    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4), typename _bi::list_av_4<A1, A2, A3, A4>::type>
-    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4)
-{
-    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4);
-    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4));
-}
-
-template<class R,
-    class B1, class B2, class B3, class B4, class B5,
-    class A1, class A2, class A3, class A4, class A5>
-    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5), typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
-    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
-{
-    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5);
-    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
-}
-
-template<class R,
-    class B1, class B2, class B3, class B4, class B5, class B6,
-    class A1, class A2, class A3, class A4, class A5, class A6>
-    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6), typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
-    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
-{
-    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6);
-    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
-}
-
-template<class R,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7>
-    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7), typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
-    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
-{
-    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7);
-    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
-}
-
-template<class R,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
-    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8), typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
-    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
-{
-    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8);
-    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
-}
-
-template<class R,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8, class B9,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
-    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8, B9), typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
-    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
-{
-    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9);
-    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
-    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
-}
diff --git a/3rdparty/boost/boost/bind/bind_mf2_cc.hpp b/3rdparty/boost/boost/bind/bind_mf2_cc.hpp
deleted file mode 100644 (file)
index 66476bc..0000000
+++ /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<class Rt2, class R, class T,
-    class A1>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (), A1 a1)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F;
-    typedef typename _bi::list_av_1<A1>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1));
-}
-
-template<class Rt2, class R, class T,
-    class A1>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) () const, A1 a1)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F;
-    typedef typename _bi::list_av_1<A1>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1));
-}
-
-// 1
-
-template<class Rt2, class R, class T,
-    class B1,
-    class A1, class A2>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
-    typedef typename _bi::list_av_2<A1, A2>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2));
-}
-
-template<class Rt2, class R, class T,
-    class B1,
-    class A1, class A2>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
-    typedef typename _bi::list_av_2<A1, A2>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2));
-}
-
-// 2
-
-template<class Rt2, class R, class T,
-    class B1, class B2,
-    class A1, class A2, class A3>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
-    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2,
-    class A1, class A2, class A3>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
-    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3));
-}
-
-// 3
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3,
-    class A1, class A2, class A3, class A4>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F;
-    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3,
-    class A1, class A2, class A3, class A4>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F;
-    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4));
-}
-
-// 4
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4,
-    class A1, class A2, class A3, class A4, class A5>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F;
-    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4,
-    class A1, class A2, class A3, class A4, class A5>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F;
-    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
-}
-
-// 5
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5,
-    class A1, class A2, class A3, class A4, class A5, class A6>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F;
-    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5,
-    class A1, class A2, class A3, class A4, class A5, class A6>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F;
-    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
-}
-
-// 6
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F;
-    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F;
-    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
-}
-
-// 7
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
-    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
-    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
-}
-
-// 8
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
-    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
-    BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
-    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
-}
diff --git a/3rdparty/boost/boost/bind/bind_mf_cc.hpp b/3rdparty/boost/boost/bind/bind_mf_cc.hpp
deleted file mode 100644 (file)
index e149384..0000000
+++ /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<class R, class T,
-    class A1>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F;
-    typedef typename _bi::list_av_1<A1>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1));
-}
-
-template<class R, class T,
-    class A1>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F;
-    typedef typename _bi::list_av_1<A1>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1));
-}
-
-template<class Rt2, class R, class T,
-    class A1>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F;
-    typedef typename _bi::list_av_1<A1>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1));
-}
-
-template<class Rt2, class R, class T,
-    class A1>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F;
-    typedef typename _bi::list_av_1<A1>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1));
-}
-
-// 1
-
-template<class R, class T,
-    class B1,
-    class A1, class A2>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
-    typedef typename _bi::list_av_2<A1, A2>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2));
-}
-
-template<class R, class T,
-    class B1,
-    class A1, class A2>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
-    typedef typename _bi::list_av_2<A1, A2>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2));
-}
-
-template<class Rt2, class R, class T,
-    class B1,
-    class A1, class A2>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
-    typedef typename _bi::list_av_2<A1, A2>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2));
-}
-
-template<class Rt2, class R, class T,
-    class B1,
-    class A1, class A2>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
-    typedef typename _bi::list_av_2<A1, A2>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2));
-}
-
-// 2
-
-template<class R, class T,
-    class B1, class B2,
-    class A1, class A2, class A3>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
-    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3));
-}
-
-template<class R, class T,
-    class B1, class B2,
-    class A1, class A2, class A3>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
-    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2,
-    class A1, class A2, class A3>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
-    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2,
-    class A1, class A2, class A3>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
-    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3));
-}
-
-// 3
-
-template<class R, class T,
-    class B1, class B2, class B3,
-    class A1, class A2, class A3, class A4>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F;
-    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4));
-}
-
-template<class R, class T,
-    class B1, class B2, class B3,
-    class A1, class A2, class A3, class A4>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F;
-    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3,
-    class A1, class A2, class A3, class A4>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F;
-    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3,
-    class A1, class A2, class A3, class A4>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F;
-    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4));
-}
-
-// 4
-
-template<class R, class T,
-    class B1, class B2, class B3, class B4,
-    class A1, class A2, class A3, class A4, class A5>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F;
-    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
-}
-
-template<class R, class T,
-    class B1, class B2, class B3, class B4,
-    class A1, class A2, class A3, class A4, class A5>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F;
-    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4,
-    class A1, class A2, class A3, class A4, class A5>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F;
-    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4,
-    class A1, class A2, class A3, class A4, class A5>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F;
-    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
-}
-
-// 5
-
-template<class R, class T,
-    class B1, class B2, class B3, class B4, class B5,
-    class A1, class A2, class A3, class A4, class A5, class A6>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F;
-    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
-}
-
-template<class R, class T,
-    class B1, class B2, class B3, class B4, class B5,
-    class A1, class A2, class A3, class A4, class A5, class A6>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F;
-    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5,
-    class A1, class A2, class A3, class A4, class A5, class A6>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F;
-    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5,
-    class A1, class A2, class A3, class A4, class A5, class A6>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F;
-    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
-}
-
-// 6
-
-template<class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F;
-    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
-}
-
-template<class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F;
-    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F;
-    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F;
-    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
-}
-
-// 7
-
-template<class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
-    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
-}
-
-template<class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
-    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
-    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
-    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
-}
-
-// 8
-
-template<class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
-    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
-}
-
-template<class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
-    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
-    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
-    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
-    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
-    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
-}
-
-template<class Rt2, class R, class T,
-    class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
-    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
-    typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
-    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
-    >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
-{
-    typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
-    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
-    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
-}
diff --git a/3rdparty/boost/boost/bind/bind_template.hpp b/3rdparty/boost/boost/bind/bind_template.hpp
deleted file mode 100644 (file)
index 411d20c..0000000
+++ /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<R, F>::type result_type;
-
-    result_type operator()()
-    {
-        list0 a;
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    result_type operator()() const
-    {
-        list0 a;
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1> result_type operator()(A1 & a1)
-    {
-        list1<A1 &> a(a1);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1> result_type operator()(A1 & a1) const
-    {
-        list1<A1 &> a(a1);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
- && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
-
-    template<class A1> result_type operator()(A1 const & a1)
-    {
-        list1<A1 const &> a(a1);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1> result_type operator()(A1 const & a1) const
-    {
-        list1<A1 const &> a(a1);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#endif
-
-    template<class A1, class A2> result_type operator()(A1 & a1, A2 & a2)
-    {
-        list2<A1 &, A2 &> a(a1, a2);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2> result_type operator()(A1 & a1, A2 & a2) const
-    {
-        list2<A1 &, A2 &> a(a1, a2);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
- && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
-
-    template<class A1, class A2> result_type operator()(A1 const & a1, A2 & a2)
-    {
-        list2<A1 const &, A2 &> a(a1, a2);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2> result_type operator()(A1 const & a1, A2 & a2) const
-    {
-        list2<A1 const &, A2 &> a(a1, a2);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-
-    template<class A1, class A2> result_type operator()(A1 & a1, A2 const & a2)
-    {
-        list2<A1 &, A2 const &> a(a1, a2);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2> result_type operator()(A1 & a1, A2 const & a2) const
-    {
-        list2<A1 &, A2 const &> a(a1, a2);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-
-    template<class A1, class A2> result_type operator()(A1 const & a1, A2 const & a2)
-    {
-        list2<A1 const &, A2 const &> a(a1, a2);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2> result_type operator()(A1 const & a1, A2 const & a2) const
-    {
-        list2<A1 const &, A2 const &> a(a1, a2);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#endif
-
-    template<class A1, class A2, class A3> result_type operator()(A1 & a1, A2 & a2, A3 & a3)
-    {
-        list3<A1 &, A2 &, A3 &> a(a1, a2, a3);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2, class A3> result_type operator()(A1 & a1, A2 & a2, A3 & a3) const
-    {
-        list3<A1 &, A2 &, A3 &> a(a1, a2, a3);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
- && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
-
-    template<class A1, class A2, class A3> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3)
-    {
-        list3<A1 const &, A2 const &, A3 const &> a(a1, a2, a3);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2, class A3> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const
-    {
-        list3<A1 const &, A2 const &, A3 const &> a(a1, a2, a3);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#endif
-
-    template<class A1, class A2, class A3, class A4> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4)
-    {
-        list4<A1 &, A2 &, A3 &, A4 &> a(a1, a2, a3, a4);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2, class A3, class A4> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const
-    {
-        list4<A1 &, A2 &, A3 &, A4 &> a(a1, a2, a3, a4);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
- && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
-
-    template<class A1, class A2, class A3, class A4> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4)
-    {
-        list4<A1 const &, A2 const &, A3 const &, A4 const &> a(a1, a2, a3, a4);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2, class A3, class A4> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const
-    {
-        list4<A1 const &, A2 const &, A3 const &, A4 const &> a(a1, a2, a3, a4);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#endif
-
-    template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5)
-    {
-        list5<A1 &, A2 &, A3 &, A4 &, A5 &> a(a1, a2, a3, a4, a5);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const
-    {
-        list5<A1 &, A2 &, A3 &, A4 &, A5 &> a(a1, a2, a3, a4, a5);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
- && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
-
-    template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5)
-    {
-        list5<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &> a(a1, a2, a3, a4, a5);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const
-    {
-        list5<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &> a(a1, a2, a3, a4, a5);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#endif
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6)
-    {
-        list6<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &> a(a1, a2, a3, a4, a5, a6);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const
-    {
-        list6<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &> a(a1, a2, a3, a4, a5, a6);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
- && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6)
-    {
-        list6<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &> a(a1, a2, a3, a4, a5, a6);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const
-    {
-        list6<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &> a(a1, a2, a3, a4, a5, a6);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#endif
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7)
-    {
-        list7<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &> a(a1, a2, a3, a4, a5, a6, a7);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const
-    {
-        list7<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &> a(a1, a2, a3, a4, a5, a6, a7);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
- && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> 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<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &> a(a1, a2, a3, a4, a5, a6, a7);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const
-    {
-        list7<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &> a(a1, a2, a3, a4, a5, a6, a7);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#endif
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8)
-    {
-        list8<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &, A8 &> a(a1, a2, a3, a4, a5, a6, a7, a8);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const
-    {
-        list8<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &, A8 &> a(a1, a2, a3, a4, a5, a6, a7, a8);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
- && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> 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<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &, A8 const &> a(a1, a2, a3, a4, a5, a6, a7, a8);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 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<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &, A8 const &> a(a1, a2, a3, a4, a5, a6, a7, a8);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#endif
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9)
-    {
-        list9<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &, A8 &, A9 &> a(a1, a2, a3, a4, a5, a6, a7, a8, a9);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const
-    {
-        list9<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &, A8 &, A9 &> a(a1, a2, a3, a4, a5, a6, a7, a8, a9);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
- && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> 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<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &, A8 const &, A9 const &> a(a1, a2, a3, a4, a5, a6, a7, a8, a9);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 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<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &, A8 const &, A9 const &> a(a1, a2, a3, a4, a5, a6, a7, a8, a9);
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-#endif
-
-    template<class A> result_type eval(A & a)
-    {
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class A> result_type eval(A & a) const
-    {
-        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
-    }
-
-    template<class V> void accept(V & v) const
-    {
-#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ )
-
-        using boost::visit_each;
-
-#endif
-        BOOST_BIND_VISIT_EACH(v, f_, 0);
-        l_.accept(v);
-    }
-
-    bool compare(this_type const & rhs) const
-    {
-        return ref_compare(f_, rhs.f_, 0) && l_ == rhs.l_;
-    }
-
-private:
-
-    F f_;
-    L l_;
diff --git a/3rdparty/boost/boost/bind/placeholders.hpp b/3rdparty/boost/boost/bind/placeholders.hpp
deleted file mode 100644 (file)
index b819ef4..0000000
+++ /dev/null
@@ -1,62 +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 <boost/bind/arg.hpp>
-#include <boost/config.hpp>
-
-namespace boost
-{
-
-namespace placeholders
-{
-
-#if defined(__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>(); }
-
-#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/3rdparty/boost/boost/bind/storage.hpp b/3rdparty/boost/boost/bind/storage.hpp
deleted file mode 100644 (file)
index be490b0..0000000
+++ /dev/null
@@ -1,475 +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 <boost/config.hpp>
-#include <boost/bind/arg.hpp>
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4512) // assignment operator could not be generated
-#endif
-
-namespace boost
-{
-
-namespace _bi
-{
-
-// 1
-
-template<class A1> struct storage1
-{
-    explicit storage1( A1 a1 ): a1_( a1 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        BOOST_BIND_VISIT_EACH(v, a1_, 0);
-    }
-
-    A1 a1_;
-};
-
-#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( __BORLANDC__ )
-
-template<int I> struct storage1< boost::arg<I> >
-{
-    explicit storage1( boost::arg<I> ) {}
-
-    template<class V> void accept(V &) const { }
-
-    static boost::arg<I> a1_() { return boost::arg<I>(); }
-};
-
-template<int I> struct storage1< boost::arg<I> (*) () >
-{
-    explicit storage1( boost::arg<I> (*) () ) {}
-
-    template<class V> void accept(V &) const { }
-
-    static boost::arg<I> a1_() { return boost::arg<I>(); }
-};
-
-#endif
-
-// 2
-
-template<class A1, class A2> struct storage2: public storage1<A1>
-{
-    typedef storage1<A1> inherited;
-
-    storage2( A1 a1, A2 a2 ): storage1<A1>( a1 ), a2_( a2 ) {}
-
-    template<class V> 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<class A1, int I> struct storage2< A1, boost::arg<I> >: public storage1<A1>
-{
-    typedef storage1<A1> inherited;
-
-    storage2( A1 a1, boost::arg<I> ): storage1<A1>( a1 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a2_() { return boost::arg<I>(); }
-};
-
-template<class A1, int I> struct storage2< A1, boost::arg<I> (*) () >: public storage1<A1>
-{
-    typedef storage1<A1> inherited;
-
-    storage2( A1 a1, boost::arg<I> (*) () ): storage1<A1>( a1 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a2_() { return boost::arg<I>(); }
-};
-
-#endif
-
-// 3
-
-template<class A1, class A2, class A3> struct storage3: public storage2< A1, A2 >
-{
-    typedef storage2<A1, A2> inherited;
-
-    storage3( A1 a1, A2 a2, A3 a3 ): storage2<A1, A2>( a1, a2 ), a3_( a3 ) {}
-
-    template<class V> 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<class A1, class A2, int I> struct storage3< A1, A2, boost::arg<I> >: public storage2< A1, A2 >
-{
-    typedef storage2<A1, A2> inherited;
-
-    storage3( A1 a1, A2 a2, boost::arg<I> ): storage2<A1, A2>( a1, a2 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a3_() { return boost::arg<I>(); }
-};
-
-template<class A1, class A2, int I> struct storage3< A1, A2, boost::arg<I> (*) () >: public storage2< A1, A2 >
-{
-    typedef storage2<A1, A2> inherited;
-
-    storage3( A1 a1, A2 a2, boost::arg<I> (*) () ): storage2<A1, A2>( a1, a2 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a3_() { return boost::arg<I>(); }
-};
-
-#endif
-
-// 4
-
-template<class A1, class A2, class A3, class A4> struct storage4: public storage3< A1, A2, A3 >
-{
-    typedef storage3<A1, A2, A3> inherited;
-
-    storage4( A1 a1, A2 a2, A3 a3, A4 a4 ): storage3<A1, A2, A3>( a1, a2, a3 ), a4_( a4 ) {}
-
-    template<class V> 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<class A1, class A2, class A3, int I> struct storage4< A1, A2, A3, boost::arg<I> >: public storage3< A1, A2, A3 >
-{
-    typedef storage3<A1, A2, A3> inherited;
-
-    storage4( A1 a1, A2 a2, A3 a3, boost::arg<I> ): storage3<A1, A2, A3>( a1, a2, a3 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a4_() { return boost::arg<I>(); }
-};
-
-template<class A1, class A2, class A3, int I> struct storage4< A1, A2, A3, boost::arg<I> (*) () >: public storage3< A1, A2, A3 >
-{
-    typedef storage3<A1, A2, A3> inherited;
-
-    storage4( A1 a1, A2 a2, A3 a3, boost::arg<I> (*) () ): storage3<A1, A2, A3>( a1, a2, a3 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a4_() { return boost::arg<I>(); }
-};
-
-#endif
-
-// 5
-
-template<class A1, class A2, class A3, class A4, class A5> struct storage5: public storage4< A1, A2, A3, A4 >
-{
-    typedef storage4<A1, A2, A3, A4> inherited;
-
-    storage5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): storage4<A1, A2, A3, A4>( a1, a2, a3, a4 ), a5_( a5 ) {}
-
-    template<class V> 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<class A1, class A2, class A3, class A4, int I> struct storage5< A1, A2, A3, A4, boost::arg<I> >: public storage4< A1, A2, A3, A4 >
-{
-    typedef storage4<A1, A2, A3, A4> inherited;
-
-    storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg<I> ): storage4<A1, A2, A3, A4>( a1, a2, a3, a4 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a5_() { return boost::arg<I>(); }
-};
-
-template<class A1, class A2, class A3, class A4, int I> struct storage5< A1, A2, A3, A4, boost::arg<I> (*) () >: public storage4< A1, A2, A3, A4 >
-{
-    typedef storage4<A1, A2, A3, A4> inherited;
-
-    storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg<I> (*) () ): storage4<A1, A2, A3, A4>( a1, a2, a3, a4 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a5_() { return boost::arg<I>(); }
-};
-
-#endif
-
-// 6
-
-template<class A1, class A2, class A3, class A4, class A5, class A6> struct storage6: public storage5< A1, A2, A3, A4, A5 >
-{
-    typedef storage5<A1, A2, A3, A4, A5> inherited;
-
-    storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): storage5<A1, A2, A3, A4, A5>( a1, a2, a3, a4, a5 ), a6_( a6 ) {}
-
-    template<class V> 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<class A1, class A2, class A3, class A4, class A5, int I> struct storage6< A1, A2, A3, A4, A5, boost::arg<I> >: public storage5< A1, A2, A3, A4, A5 >
-{
-    typedef storage5<A1, A2, A3, A4, A5> inherited;
-
-    storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg<I> ): storage5<A1, A2, A3, A4, A5>( a1, a2, a3, a4, a5 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a6_() { return boost::arg<I>(); }
-};
-
-template<class A1, class A2, class A3, class A4, class A5, int I> struct storage6< A1, A2, A3, A4, A5, boost::arg<I> (*) () >: public storage5< A1, A2, A3, A4, A5 >
-{
-    typedef storage5<A1, A2, A3, A4, A5> inherited;
-
-    storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg<I> (*) () ): storage5<A1, A2, A3, A4, A5>( a1, a2, a3, a4, a5 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a6_() { return boost::arg<I>(); }
-};
-
-#endif
-
-// 7
-
-template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> struct storage7: public storage6< A1, A2, A3, A4, A5, A6 >
-{
-    typedef storage6<A1, A2, A3, A4, A5, A6> inherited;
-
-    storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): storage6<A1, A2, A3, A4, A5, A6>( a1, a2, a3, a4, a5, a6 ), a7_( a7 ) {}
-
-    template<class V> 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<class A1, class A2, class A3, class A4, class A5, class A6, int I> struct storage7< A1, A2, A3, A4, A5, A6, boost::arg<I> >: public storage6< A1, A2, A3, A4, A5, A6 >
-{
-    typedef storage6<A1, A2, A3, A4, A5, A6> inherited;
-
-    storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg<I> ): storage6<A1, A2, A3, A4, A5, A6>( a1, a2, a3, a4, a5, a6 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a7_() { return boost::arg<I>(); }
-};
-
-template<class A1, class A2, class A3, class A4, class A5, class A6, int I> struct storage7< A1, A2, A3, A4, A5, A6, boost::arg<I> (*) () >: public storage6< A1, A2, A3, A4, A5, A6 >
-{
-    typedef storage6<A1, A2, A3, A4, A5, A6> inherited;
-
-    storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg<I> (*) () ): storage6<A1, A2, A3, A4, A5, A6>( a1, a2, a3, a4, a5, a6 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a7_() { return boost::arg<I>(); }
-};
-
-#endif
-
-// 8
-
-template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> struct storage8: public storage7< A1, A2, A3, A4, A5, A6, A7 >
-{
-    typedef storage7<A1, A2, A3, A4, A5, A6, A7> 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>( a1, a2, a3, a4, a5, a6, a7 ), a8_( a8 ) {}
-
-    template<class V> 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<class A1, class A2, class A3, class A4, class A5, class A6, class A7, int I> struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg<I> >: public storage7< A1, A2, A3, A4, A5, A6, A7 >
-{
-    typedef storage7<A1, A2, A3, A4, A5, A6, A7> inherited;
-
-    storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg<I> ): storage7<A1, A2, A3, A4, A5, A6, A7>( a1, a2, a3, a4, a5, a6, a7 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a8_() { return boost::arg<I>(); }
-};
-
-template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, int I> struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg<I> (*) () >: public storage7< A1, A2, A3, A4, A5, A6, A7 >
-{
-    typedef storage7<A1, A2, A3, A4, A5, A6, A7> inherited;
-
-    storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg<I> (*) () ): storage7<A1, A2, A3, A4, A5, A6, A7>( a1, a2, a3, a4, a5, a6, a7 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a8_() { return boost::arg<I>(); }
-};
-
-#endif
-
-// 9
-
-template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> struct storage9: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 >
-{
-    typedef storage8<A1, A2, A3, A4, A5, A6, A7, A8> 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>( a1, a2, a3, a4, a5, a6, a7, a8 ), a9_( a9 ) {}
-
-    template<class V> 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<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, int I> struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg<I> >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 >
-{
-    typedef storage8<A1, A2, A3, A4, A5, A6, A7, A8> inherited;
-
-    storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg<I> ): storage8<A1, A2, A3, A4, A5, A6, A7, A8>( a1, a2, a3, a4, a5, a6, a7, a8 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a9_() { return boost::arg<I>(); }
-};
-
-template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, int I> struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg<I> (*) () >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 >
-{
-    typedef storage8<A1, A2, A3, A4, A5, A6, A7, A8> inherited;
-
-    storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg<I> (*) () ): storage8<A1, A2, A3, A4, A5, A6, A7, A8>( a1, a2, a3, a4, a5, a6, a7, a8 ) {}
-
-    template<class V> void accept(V & v) const
-    {
-        inherited::accept(v);
-    }
-
-    static boost::arg<I> a9_() { return boost::arg<I>(); }
-};
-
-#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/3rdparty/boost/boost/call_traits.hpp b/3rdparty/boost/boost/call_traits.hpp
deleted file mode 100644 (file)
index 2c1328e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
-//  Use, modification and distribution are subject to the Boost Software License,
-//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-//  http://www.boost.org/LICENSE_1_0.txt).
-//
-//  See http://www.boost.org/libs/utility for most recent version including documentation.
-
-//  See boost/detail/call_traits.hpp
-//  for full copyright notices.
-
-#ifndef BOOST_CALL_TRAITS_HPP
-#define BOOST_CALL_TRAITS_HPP
-
-#ifndef BOOST_CONFIG_HPP
-#include <boost/config.hpp>
-#endif
-
-#include <boost/detail/call_traits.hpp>
-
-#endif // BOOST_CALL_TRAITS_HPP
index 5481e5ee62358bccd55b68cb1093e12582396897..01355bb7d537484ebf40dd0b564905e865e47221 100644 (file)
 #define BOOST_HAS_LONG_LONG
 
 //
-// We disable this if the compiler is really nvcc as it
-// doesn't actually support __int128 as of CUDA_VERSION=5000
+// We disable this if the compiler is really nvcc with C++03 as it
+// doesn't actually support __int128 as of CUDA_VERSION=7500
 // even though it defines __SIZEOF_INT128__.
 // See https://svn.boost.org/trac/boost/ticket/10418
+//     https://svn.boost.org/trac/boost/ticket/11852
 // Only re-enable this for nvcc if you're absolutely sure
 // of the circumstances under which it's supported.
 // Similarly __SIZEOF_INT128__ is defined when targetting msvc
 // compatibility even though the required support functions are absent.
 //
-#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) && !defined(_MSC_VER)
+#if defined(__CUDACC__)
+#  if defined(BOOST_GCC_CXX11)
+#    define BOOST_NVCC_CXX11
+#  else
+#    define BOOST_NVCC_CXX03
+#  endif
+#endif
+
+#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03) && !defined(_MSC_VER)
 #  define BOOST_HAS_INT128
 #endif
 
index d9dd59dc5fd22684445d89dcc6fc5639d6cc708d..fbd3dd9c1918ceafa285f2ded3e6e1be3997f03e 100644 (file)
 //
 // Recent GCC versions have __int128 when in 64-bit mode.
 //
-// We disable this if the compiler is really nvcc as it
-// doesn't actually support __int128 as of CUDA_VERSION=5000
+// We disable this if the compiler is really nvcc with C++03 as it
+// doesn't actually support __int128 as of CUDA_VERSION=7500
 // even though it defines __SIZEOF_INT128__.
 // See https://svn.boost.org/trac/boost/ticket/8048
+//     https://svn.boost.org/trac/boost/ticket/11852
 // Only re-enable this for nvcc if you're absolutely sure
 // of the circumstances under which it's supported:
 //
-#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__)
+#if defined(__CUDACC__)
+#  if defined(BOOST_GCC_CXX11)
+#    define BOOST_NVCC_CXX11
+#  else
+#    define BOOST_NVCC_CXX03
+#  endif
+#endif
+
+#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03)
 #  define BOOST_HAS_INT128
 #endif
 //
 // include a std lib header to detect this - not ideal, but we'll
 // be including <cstddef> later anyway when we select the std lib.
 //
+// Nevertheless, as of CUDA 7.5, using __float128 with the host
+// compiler in pre-C++11 mode is still not supported.
+// See https://svn.boost.org/trac/boost/ticket/11852
+//
 #ifdef __cplusplus
 #include <cstddef>
 #else
 #include <stddef.h>
 #endif
-#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__)
+#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) && !defined(BOOST_NVCC_CXX03)
 # define BOOST_HAS_FLOAT128
 #endif
 
index 7789b944648e558b7d31630c8327dfcb9f69df96..88ac023acc3f6bee4b44cfe53d28cdffefa1f795 100644 (file)
@@ -514,7 +514,15 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
 #  define BOOST_HAS_STDINT_H
 #endif
 
-#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(__CUDACC__)
+#if defined(__CUDACC__)
+#  if defined(BOOST_GCC_CXX11)
+#    define BOOST_NVCC_CXX11
+#  else
+#    define BOOST_NVCC_CXX03
+#  endif
+#endif
+
+#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(BOOST_NVCC_CXX03)
 #  define BOOST_HAS_INT128
 #endif
 
index bbe81f6ee5c392b35c46a09ad73e0a2401f2ee36..5a047070afe12ac7321facd7d230d5883820f8a6 100644 (file)
 // NVIDIA Specific support
 // BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device
 #define BOOST_GPU_ENABLED __host__ __device__
+
+// A bug in version 7.0 of CUDA prevents use of variadic templates in some occasions
+// https://svn.boost.org/trac/boost/ticket/11897
+// This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance
+// check is enough to detect versions < 7.5
+#if !defined(__CUDACC_VER__) || (__CUDACC_VER__ < 70500)
+#   define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#endif
index ab5d123544ed2375428c68a98c352334ea7cbd30..645bb63bfc6d789b33319f44670b7ee011916ba8 100644 (file)
 #  define BOOST_NO_CXX11_HDR_FUNCTIONAL
 #  define BOOST_NO_CXX11_STD_ALIGN
 #  define BOOST_NO_CXX11_ADDRESSOF
-#endif
-
+#  define BOOST_NO_CXX11_HDR_ATOMIC
+#  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+#  define BOOST_NO_CXX11_HDR_CHRONO
+#  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#  define BOOST_NO_CXX11_HDR_FUTURE
+#elif _LIBCPP_VERSION < 3700
 //
 // These appear to be unusable/incomplete so far:
 //
+#  define BOOST_NO_CXX11_HDR_ATOMIC
+#  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
 #  define BOOST_NO_CXX11_HDR_CHRONO
-#  define BOOST_NO_CXX11_HDR_FUTURE
 #  define BOOST_NO_CXX11_HDR_TYPE_TRAITS
-#  define BOOST_NO_CXX11_ATOMIC_SMART_PTR
-#  define BOOST_NO_CXX11_HDR_ATOMIC
+#  define BOOST_NO_CXX11_HDR_FUTURE
+#endif
 
+
+#if _LIBCPP_VERSION < 3700
 // libc++ uses a non-standard messages_base
 #define BOOST_NO_STD_MESSAGES
+#endif
 
 #if defined(__has_include)
 #if !__has_include(<shared_mutex>)
index 44aeb8ded7647156d4fef7e8eddcf7143ee0779c..f13c26a7f4d52af03421e64e960411deaedd51b3 100644 (file)
 # pragma once
 #endif
 
-#if defined( __clang__ ) && defined( __has_include )
+// __has_include is currently supported by GCC and Clang. However GCC 4.9 may have issues and
+// returns 1 for 'defined( __has_include )', while '__has_include' is actually not supported:
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63662
+#if defined( __has_include ) && (!defined( BOOST_GCC ) || (__GNUC__ + 0) >= 5)
 # if __has_include(<cxxabi.h>)
 #  define BOOST_CORE_HAS_CXXABI_H
 # endif
diff --git a/3rdparty/boost/boost/core/is_same.hpp b/3rdparty/boost/boost/core/is_same.hpp
deleted file mode 100644 (file)
index f373c65..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef BOOST_CORE_IS_SAME_HPP_INCLUDED
-#define BOOST_CORE_IS_SAME_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-// is_same<T1,T2>::value is true when T1 == T2
-//
-// Copyright 2014 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0.
-// See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt
-
-#include <boost/config.hpp>
-
-namespace boost
-{
-
-namespace core
-{
-
-template< class T1, class T2 > struct is_same
-{
-    BOOST_STATIC_CONSTANT( bool, value = false );
-};
-
-template< class T > struct is_same< T, T >
-{
-    BOOST_STATIC_CONSTANT( bool, value = true );
-};
-
-} // namespace core
-
-} // namespace boost
-
-#endif // #ifndef BOOST_CORE_IS_SAME_HPP_INCLUDED
diff --git a/3rdparty/boost/boost/detail/call_traits.hpp b/3rdparty/boost/boost/detail/call_traits.hpp
deleted file mode 100644 (file)
index 36dea00..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
-//  Use, modification and distribution are subject to the Boost Software License,
-//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-//  http://www.boost.org/LICENSE_1_0.txt).
-//
-//  See http://www.boost.org/libs/utility for most recent version including documentation.
-
-// call_traits: defines typedefs for function usage
-// (see libs/utility/call_traits.htm)
-
-/* Release notes:
-   23rd July 2000:
-      Fixed array specialization. (JM)
-      Added Borland specific fixes for reference types
-      (issue raised by Steve Cleary).
-*/
-
-#ifndef BOOST_DETAIL_CALL_TRAITS_HPP
-#define BOOST_DETAIL_CALL_TRAITS_HPP
-
-#ifndef BOOST_CONFIG_HPP
-#include <boost/config.hpp>
-#endif
-#include <cstddef>
-
-#include <boost/type_traits/is_arithmetic.hpp>
-#include <boost/type_traits/is_enum.hpp>
-#include <boost/type_traits/is_pointer.hpp>
-#include <boost/detail/workaround.hpp>
-
-namespace boost{
-
-namespace detail{
-
-template <typename T, bool small_>
-struct ct_imp2
-{
-   typedef const T& param_type;
-};
-
-template <typename T>
-struct ct_imp2<T, true>
-{
-   typedef const T param_type;
-};
-
-template <typename T, bool isp, bool b1, bool b2>
-struct ct_imp
-{
-   typedef const T& param_type;
-};
-
-template <typename T, bool isp, bool b2>
-struct ct_imp<T, isp, true, b2>
-{
-   typedef typename ct_imp2<T, sizeof(T) <= sizeof(void*)>::param_type param_type;
-};
-
-template <typename T, bool isp, bool b1>
-struct ct_imp<T, isp, b1, true>
-{
-   typedef typename ct_imp2<T, sizeof(T) <= sizeof(void*)>::param_type param_type;
-};
-
-template <typename T, bool b1, bool b2>
-struct ct_imp<T, true, b1, b2>
-{
-   typedef const T param_type;
-};
-
-}
-
-template <typename T>
-struct call_traits
-{
-public:
-   typedef T value_type;
-   typedef T& reference;
-   typedef const T& const_reference;
-   //
-   // C++ Builder workaround: we should be able to define a compile time
-   // constant and pass that as a single template parameter to ct_imp<T,bool>,
-   // however compiler bugs prevent this - instead pass three bool's to
-   // ct_imp<T,bool,bool,bool> and add an extra partial specialisation
-   // of ct_imp to handle the logic. (JM)
-   typedef typename boost::detail::ct_imp<
-      T,
-      ::boost::is_pointer<T>::value,
-      ::boost::is_arithmetic<T>::value,
-      ::boost::is_enum<T>::value
-   >::param_type param_type;
-};
-
-template <typename T>
-struct call_traits<T&>
-{
-   typedef T& value_type;
-   typedef T& reference;
-   typedef const T& const_reference;
-   typedef T& param_type;  // hh removed const
-};
-
-#if BOOST_WORKAROUND( __BORLANDC__,  < 0x5A0 )
-// these are illegal specialisations; cv-qualifies applied to
-// references have no effect according to [8.3.2p1],
-// C++ Builder requires them though as it treats cv-qualified
-// references as distinct types...
-template <typename T>
-struct call_traits<T&const>
-{
-   typedef T& value_type;
-   typedef T& reference;
-   typedef const T& const_reference;
-   typedef T& param_type;  // hh removed const
-};
-template <typename T>
-struct call_traits<T&volatile>
-{
-   typedef T& value_type;
-   typedef T& reference;
-   typedef const T& const_reference;
-   typedef T& param_type;  // hh removed const
-};
-template <typename T>
-struct call_traits<T&const volatile>
-{
-   typedef T& value_type;
-   typedef T& reference;
-   typedef const T& const_reference;
-   typedef T& param_type;  // hh removed const
-};
-
-template <typename T>
-struct call_traits< T * >
-{
-   typedef T * value_type;
-   typedef T * & reference;
-   typedef T * const & const_reference;
-   typedef T * const param_type;  // hh removed const
-};
-#endif
-#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
-template <typename T, std::size_t N>
-struct call_traits<T [N]>
-{
-private:
-   typedef T array_type[N];
-public:
-   // degrades array to pointer:
-   typedef const T* value_type;
-   typedef array_type& reference;
-   typedef const array_type& const_reference;
-   typedef const T* const param_type;
-};
-
-template <typename T, std::size_t N>
-struct call_traits<const T [N]>
-{
-private:
-   typedef const T array_type[N];
-public:
-   // degrades array to pointer:
-   typedef const T* value_type;
-   typedef array_type& reference;
-   typedef const array_type& const_reference;
-   typedef const T* const param_type;
-};
-#endif
-
-}
-
-#endif // BOOST_DETAIL_CALL_TRAITS_HPP
diff --git a/3rdparty/boost/boost/functional.hpp b/3rdparty/boost/boost/functional.hpp
deleted file mode 100644 (file)
index b618485..0000000
+++ /dev/null
@@ -1,548 +0,0 @@
-// ------------------------------------------------------------------------------
-// Copyright (c) 2000 Cadenza New Zealand Ltd
-// Distributed under the Boost Software License, Version 1.0. (See accompany-
-// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-// ------------------------------------------------------------------------------
-// Boost functional.hpp header file
-// See http://www.boost.org/libs/functional for documentation.
-// ------------------------------------------------------------------------------
-// $Id$
-// ------------------------------------------------------------------------------
-
-#ifndef BOOST_FUNCTIONAL_HPP
-#define BOOST_FUNCTIONAL_HPP
-
-#include <boost/config.hpp>
-#include <boost/call_traits.hpp>
-#include <functional>
-
-namespace boost
-{
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-    // --------------------------------------------------------------------------
-    // The following traits classes allow us to avoid the need for ptr_fun
-    // because the types of arguments and the result of a function can be 
-    // deduced.
-    //
-    // In addition to the standard types defined in unary_function and 
-    // binary_function, we add
-    //
-    // - function_type, the type of the function or function object itself.
-    //
-    // - param_type, the type that should be used for passing the function or
-    //   function object as an argument.
-    // --------------------------------------------------------------------------
-    namespace detail
-    {
-        template <class Operation>
-        struct unary_traits_imp;
-        
-        template <class Operation>
-        struct unary_traits_imp<Operation*>
-        {
-            typedef Operation                         function_type;
-            typedef const function_type &             param_type;
-            typedef typename Operation::result_type   result_type;
-            typedef typename Operation::argument_type argument_type;
-        };
-
-        template <class R, class A>
-        struct unary_traits_imp<R(*)(A)>
-        {
-            typedef R (*function_type)(A);
-            typedef R (*param_type)(A);
-            typedef R result_type;
-            typedef A argument_type;
-        };
-
-        template <class Operation>
-        struct binary_traits_imp;
-
-        template <class Operation>
-        struct binary_traits_imp<Operation*>
-        {
-            typedef Operation                                function_type;
-            typedef const function_type &                    param_type;
-            typedef typename Operation::result_type          result_type;
-            typedef typename Operation::first_argument_type  first_argument_type;
-            typedef typename Operation::second_argument_type second_argument_type;
-        };
-        
-        template <class R, class A1, class A2>
-        struct binary_traits_imp<R(*)(A1,A2)>
-        {
-            typedef R (*function_type)(A1,A2);
-            typedef R (*param_type)(A1,A2);
-            typedef R result_type;
-            typedef A1 first_argument_type;
-            typedef A2 second_argument_type;
-        };
-    } // namespace detail
-    
-    template <class Operation>
-    struct unary_traits
-    {
-        typedef typename detail::unary_traits_imp<Operation*>::function_type function_type;
-        typedef typename detail::unary_traits_imp<Operation*>::param_type    param_type;
-        typedef typename detail::unary_traits_imp<Operation*>::result_type   result_type;
-        typedef typename detail::unary_traits_imp<Operation*>::argument_type argument_type;
-    }; 
-
-    template <class R, class A>
-    struct unary_traits<R(*)(A)>
-    {
-        typedef R (*function_type)(A);
-        typedef R (*param_type)(A);
-        typedef R result_type;
-        typedef A argument_type;
-    };
-
-    template <class Operation>
-    struct binary_traits
-    {
-        typedef typename detail::binary_traits_imp<Operation*>::function_type        function_type;
-        typedef typename detail::binary_traits_imp<Operation*>::param_type           param_type;
-        typedef typename detail::binary_traits_imp<Operation*>::result_type          result_type;
-        typedef typename detail::binary_traits_imp<Operation*>::first_argument_type  first_argument_type;
-        typedef typename detail::binary_traits_imp<Operation*>::second_argument_type second_argument_type;
-    };
-    
-    template <class R, class A1, class A2>
-    struct binary_traits<R(*)(A1,A2)>
-    {
-        typedef R (*function_type)(A1,A2);
-        typedef R (*param_type)(A1,A2);
-        typedef R result_type;
-        typedef A1 first_argument_type;
-        typedef A2 second_argument_type;
-    };
-#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-    // --------------------------------------------------------------------------
-    // If we have no partial specialisation available, decay to a situation
-    // that is no worse than in the Standard, i.e., ptr_fun will be required.
-    // --------------------------------------------------------------------------
-
-    template <class Operation>
-    struct unary_traits
-    {
-        typedef Operation                         function_type;
-        typedef const Operation&                  param_type;
-        typedef typename Operation::result_type   result_type;
-        typedef typename Operation::argument_type argument_type;
-    }; 
-    
-    template <class Operation>
-    struct binary_traits
-    {
-        typedef Operation                                function_type;
-        typedef const Operation &                        param_type;
-        typedef typename Operation::result_type          result_type;
-        typedef typename Operation::first_argument_type  first_argument_type;
-        typedef typename Operation::second_argument_type second_argument_type;
-    };    
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-    
-    // --------------------------------------------------------------------------
-    // unary_negate, not1
-    // --------------------------------------------------------------------------
-    template <class Predicate>
-    class unary_negate
-        : public std::unary_function<typename unary_traits<Predicate>::argument_type,bool>
-    {
-      public:
-        explicit unary_negate(typename unary_traits<Predicate>::param_type x)
-            :
-            pred(x)
-        {}
-        bool operator()(typename call_traits<typename unary_traits<Predicate>::argument_type>::param_type x) const
-        {
-            return !pred(x);
-        }
-      private:
-        typename unary_traits<Predicate>::function_type pred;
-    };
-
-    template <class Predicate>
-    unary_negate<Predicate> not1(const Predicate &pred)
-    {
-        // The cast is to placate Borland C++Builder in certain circumstances.
-        // I don't think it should be necessary.
-        return unary_negate<Predicate>((typename unary_traits<Predicate>::param_type)pred);
-    }
-
-    template <class Predicate>
-    unary_negate<Predicate> not1(Predicate &pred)
-    {
-        return unary_negate<Predicate>(pred);
-    }
-
-    // --------------------------------------------------------------------------
-    // binary_negate, not2
-    // --------------------------------------------------------------------------
-    template <class Predicate>
-    class binary_negate
-        : public std::binary_function<typename binary_traits<Predicate>::first_argument_type,
-                                      typename binary_traits<Predicate>::second_argument_type,
-                                      bool>
-    {
-      public:
-        explicit binary_negate(typename binary_traits<Predicate>::param_type x)
-            :
-            pred(x)
-        {}
-        bool operator()(typename call_traits<typename binary_traits<Predicate>::first_argument_type>::param_type x,
-                        typename call_traits<typename binary_traits<Predicate>::second_argument_type>::param_type y) const
-        {
-            return !pred(x,y);
-        }
-      private:
-        typename binary_traits<Predicate>::function_type pred;
-    };
-
-    template <class Predicate>
-    binary_negate<Predicate> not2(const Predicate &pred)
-    {
-        // The cast is to placate Borland C++Builder in certain circumstances.
-        // I don't think it should be necessary.
-        return binary_negate<Predicate>((typename binary_traits<Predicate>::param_type)pred);
-    }
-
-    template <class Predicate>
-    binary_negate<Predicate> not2(Predicate &pred)
-    {
-        return binary_negate<Predicate>(pred);
-    }
-        
-    // --------------------------------------------------------------------------
-    // binder1st, bind1st
-    // --------------------------------------------------------------------------
-    template <class Operation>
-    class binder1st
-        : public std::unary_function<typename binary_traits<Operation>::second_argument_type,
-                                     typename binary_traits<Operation>::result_type>
-    {       
-      public:
-        binder1st(typename binary_traits<Operation>::param_type x,
-                  typename call_traits<typename binary_traits<Operation>::first_argument_type>::param_type y)
-            :
-            op(x), value(y)
-        {}
-        
-        typename binary_traits<Operation>::result_type
-        operator()(typename call_traits<typename binary_traits<Operation>::second_argument_type>::param_type x) const
-        {
-            return op(value, x);
-        }
-        
-      protected:
-        typename binary_traits<Operation>::function_type op;
-        typename binary_traits<Operation>::first_argument_type value;
-    };
-
-    template <class Operation>
-    inline binder1st<Operation> bind1st(const Operation &op,
-                                        typename call_traits<
-                                                    typename binary_traits<Operation>::first_argument_type
-                                        >::param_type x)
-    {
-        // The cast is to placate Borland C++Builder in certain circumstances.
-        // I don't think it should be necessary.
-        return binder1st<Operation>((typename binary_traits<Operation>::param_type)op, x);
-    }
-
-    template <class Operation>
-    inline binder1st<Operation> bind1st(Operation &op,
-                                        typename call_traits<
-                                                    typename binary_traits<Operation>::first_argument_type
-                                        >::param_type x)
-    {
-        return binder1st<Operation>(op, x);
-    }
-
-    // --------------------------------------------------------------------------
-    // binder2nd, bind2nd
-    // --------------------------------------------------------------------------
-    template <class Operation>
-    class binder2nd
-        : public std::unary_function<typename binary_traits<Operation>::first_argument_type,
-                                     typename binary_traits<Operation>::result_type>
-    {
-      public:
-        binder2nd(typename binary_traits<Operation>::param_type x,
-                  typename call_traits<typename binary_traits<Operation>::second_argument_type>::param_type y)
-            :
-            op(x), value(y)
-        {}
-        
-        typename binary_traits<Operation>::result_type
-        operator()(typename call_traits<typename binary_traits<Operation>::first_argument_type>::param_type x) const
-        {
-            return op(x, value);
-        }               
-        
-      protected:
-        typename binary_traits<Operation>::function_type op;
-        typename binary_traits<Operation>::second_argument_type value;
-    };
-
-    template <class Operation>
-    inline binder2nd<Operation> bind2nd(const Operation &op,
-                                        typename call_traits<
-                                                    typename binary_traits<Operation>::second_argument_type
-                                        >::param_type x)
-    {
-        // The cast is to placate Borland C++Builder in certain circumstances.
-        // I don't think it should be necessary.
-        return binder2nd<Operation>((typename binary_traits<Operation>::param_type)op, x);
-    }
-
-    template <class Operation>
-    inline binder2nd<Operation> bind2nd(Operation &op,
-                                        typename call_traits<
-                                                    typename binary_traits<Operation>::second_argument_type
-                                        >::param_type x)
-    {
-        return binder2nd<Operation>(op, x);
-    }
-
-    // --------------------------------------------------------------------------
-    // mem_fun, etc
-    // --------------------------------------------------------------------------
-    template <class S, class T>
-    class mem_fun_t : public std::unary_function<T*, S>
-    {
-      public:
-        explicit mem_fun_t(S (T::*p)())
-            :
-            ptr(p)
-        {}
-        S operator()(T* p) const
-        {
-            return (p->*ptr)();
-        }
-      private:
-        S (T::*ptr)();
-    };
-
-    template <class S, class T, class A>
-    class mem_fun1_t : public std::binary_function<T*, A, S>
-    {
-      public:   
-        explicit mem_fun1_t(S (T::*p)(A))
-            :
-            ptr(p)
-        {}
-        S operator()(T* p, typename call_traits<A>::param_type x) const
-        {
-            return (p->*ptr)(x);
-        }
-      private:
-        S (T::*ptr)(A);
-    };
-
-    template <class S, class T>
-    class const_mem_fun_t : public std::unary_function<const T*, S>
-    {
-      public:
-        explicit const_mem_fun_t(S (T::*p)() const)
-            :
-            ptr(p)
-        {}
-        S operator()(const T* p) const
-        {
-            return (p->*ptr)();
-        }
-      private:
-        S (T::*ptr)() const;        
-    };
-
-    template <class S, class T, class A>
-    class const_mem_fun1_t : public std::binary_function<const T*, A, S>
-    {
-      public:
-        explicit const_mem_fun1_t(S (T::*p)(A) const)
-            :
-            ptr(p)
-        {}
-        S operator()(const T* p, typename call_traits<A>::param_type x) const
-        {
-            return (p->*ptr)(x);
-        }
-      private:
-        S (T::*ptr)(A) const;
-    };
-    
-    template<class S, class T>
-    inline mem_fun_t<S,T> mem_fun(S (T::*f)())
-    {
-        return mem_fun_t<S,T>(f);
-    }
-    
-    template<class S, class T, class A>
-    inline mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A))
-    {
-        return mem_fun1_t<S,T,A>(f);
-    }
-
-#ifndef BOOST_NO_POINTER_TO_MEMBER_CONST
-    template<class S, class T>
-    inline const_mem_fun_t<S,T> mem_fun(S (T::*f)() const)
-    {
-        return const_mem_fun_t<S,T>(f);
-    }
-    
-    template<class S, class T, class A>
-    inline const_mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A) const)
-    {
-        return const_mem_fun1_t<S,T,A>(f);
-    }
-#endif // BOOST_NO_POINTER_TO_MEMBER_CONST
-
-    // --------------------------------------------------------------------------
-    // mem_fun_ref, etc
-    // --------------------------------------------------------------------------
-    template <class S, class T>
-    class mem_fun_ref_t : public std::unary_function<T&, S>
-    {
-      public:
-        explicit mem_fun_ref_t(S (T::*p)())
-            :
-            ptr(p)
-        {}
-        S operator()(T& p) const
-        {
-            return (p.*ptr)();
-        }
-      private:
-        S (T::*ptr)();
-    };
-
-    template <class S, class T, class A>
-    class mem_fun1_ref_t : public std::binary_function<T&, A, S>
-    {
-      public:
-        explicit mem_fun1_ref_t(S (T::*p)(A))
-            :
-            ptr(p)
-        {}
-        S operator()(T& p, typename call_traits<A>::param_type x) const
-        {
-            return (p.*ptr)(x);
-        }
-      private:
-        S (T::*ptr)(A);
-    };
-    
-    template <class S, class T>
-    class const_mem_fun_ref_t : public std::unary_function<const T&, S>
-    {
-      public:
-        explicit const_mem_fun_ref_t(S (T::*p)() const)
-            :
-            ptr(p)
-        {}
-        
-        S operator()(const T &p) const
-        {
-            return (p.*ptr)();
-        }
-      private:
-        S (T::*ptr)() const;
-    };
-
-    template <class S, class T, class A>
-    class const_mem_fun1_ref_t : public std::binary_function<const T&, A, S>
-    {
-      public:
-        explicit const_mem_fun1_ref_t(S (T::*p)(A) const)
-            :
-            ptr(p)
-        {}
-
-        S operator()(const T& p, typename call_traits<A>::param_type x) const
-        {
-            return (p.*ptr)(x);
-        }
-      private:
-        S (T::*ptr)(A) const;
-    };
-    
-    template<class S, class T>
-    inline mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)())
-    {
-        return mem_fun_ref_t<S,T>(f);
-    }
-
-    template<class S, class T, class A>
-    inline mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A))
-    {
-        return mem_fun1_ref_t<S,T,A>(f);
-    }
-
-#ifndef BOOST_NO_POINTER_TO_MEMBER_CONST
-    template<class S, class T>
-    inline const_mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)() const)
-    {
-        return const_mem_fun_ref_t<S,T>(f);
-    }
-
-    template<class S, class T, class A>
-    inline const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const)
-    {
-        return const_mem_fun1_ref_t<S,T,A>(f);
-    }   
-#endif // BOOST_NO_POINTER_TO_MEMBER_CONST
-
-    // --------------------------------------------------------------------------
-    // ptr_fun
-    // --------------------------------------------------------------------------
-    template <class Arg, class Result>
-    class pointer_to_unary_function : public std::unary_function<Arg,Result>
-    {
-      public:
-        explicit pointer_to_unary_function(Result (*f)(Arg))
-            :
-            func(f)
-        {}
-
-        Result operator()(typename call_traits<Arg>::param_type x) const
-        {
-            return func(x);
-        }
-        
-      private:
-        Result (*func)(Arg);
-    };
-
-    template <class Arg, class Result>
-    inline pointer_to_unary_function<Arg,Result> ptr_fun(Result (*f)(Arg))
-    {
-        return pointer_to_unary_function<Arg,Result>(f);
-    }
-
-    template <class Arg1, class Arg2, class Result>
-    class pointer_to_binary_function : public std::binary_function<Arg1,Arg2,Result>
-    {
-      public:
-        explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2))
-            :
-            func(f)
-        {}
-        
-        Result operator()(typename call_traits<Arg1>::param_type x, typename call_traits<Arg2>::param_type y) const
-        {
-            return func(x,y);
-        }
-        
-      private:
-        Result (*func)(Arg1, Arg2);
-    };
-
-    template <class Arg1, class Arg2, class Result>
-    inline pointer_to_binary_function<Arg1,Arg2,Result> ptr_fun(Result (*f)(Arg1, Arg2))
-    {
-        return pointer_to_binary_function<Arg1,Arg2,Result>(f);
-    }
-} // namespace boost
-
-#endif
diff --git a/3rdparty/boost/boost/is_placeholder.hpp b/3rdparty/boost/boost/is_placeholder.hpp
deleted file mode 100644 (file)
index 5f1b544..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef BOOST_IS_PLACEHOLDER_HPP_INCLUDED
-#define BOOST_IS_PLACEHOLDER_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined( _MSC_VER ) && ( _MSC_VER >= 1020 )
-# pragma once
-#endif
-
-
-//  is_placeholder.hpp - TR1 is_placeholder metafunction
-//
-//  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
-
-
-namespace boost
-{
-
-template< class T > struct is_placeholder
-{
-    enum _vt { value = 0 };
-};
-
-} // namespace boost
-
-#endif // #ifndef BOOST_IS_PLACEHOLDER_HPP_INCLUDED
index dc3d7e3fb7d917ac223e582ba2077f6bfb67af74..3dc21f88a4373d1ba0465ab4b27ed7d8f15b4477 100644 (file)
@@ -36,7 +36,7 @@ namespace boost
     template <typename Target, typename Source>
     inline Target lexical_cast(const Source &arg)
     {
-        Target result;
+        Target result = Target();
 
         if (!boost::conversion::detail::try_lexical_convert(arg, result)) {
             boost::conversion::detail::throw_bad_cast<Source, Target>();
index 1881cdf371440e504e9b519fb6e4178854a77f37..b079fd42aec55fab4da565b71d3c6c007aea5e28 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright Kevlin Henney, 2000-2005.
 // Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2014.
+// Copyright Antony Polukhin, 2011-2016.
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
@@ -57,8 +57,15 @@ namespace boost {
             : boost::true_type
         {};
 
+        // Sun Studio has problem with partial specialization of templates differing only in namespace.
+        // We workaround that by making `is_booststring` trait, instead of specializing `is_stdstring` for `boost::container::basic_string`.
+        template<typename T>
+        struct is_booststring
+            : boost::false_type
+        {};
+
         template<typename CharT, typename Traits, typename Alloc>
-        struct is_stdstring< boost::container::basic_string<CharT, Traits, Alloc> >
+        struct is_booststring< boost::container::basic_string<CharT, Traits, Alloc> >
             : boost::true_type
         {};
 
@@ -111,13 +118,20 @@ namespace boost {
             : boost::true_type
         {};
 
+        // Sun Studio has problem with partial specialization of templates differing only in namespace.
+        // We workaround that by making `is_char_array_to_booststring` trait, instead of specializing `is_char_array_to_stdstring` for `boost::container::basic_string`.
+        template<typename Target, typename Source>
+        struct is_char_array_to_booststring
+            : boost::false_type
+        {};
+
         template<typename CharT, typename Traits, typename Alloc>
-        struct is_char_array_to_stdstring< boost::container::basic_string<CharT, Traits, Alloc>, CharT* >
+        struct is_char_array_to_booststring< boost::container::basic_string<CharT, Traits, Alloc>, CharT* >
             : boost::true_type
         {};
 
         template<typename CharT, typename Traits, typename Alloc>
-        struct is_char_array_to_stdstring< boost::container::basic_string<CharT, Traits, Alloc>, const CharT* >
+        struct is_char_array_to_booststring< boost::container::basic_string<CharT, Traits, Alloc>, const CharT* >
             : boost::true_type
         {};
 
@@ -151,9 +165,10 @@ namespace boost {
             typedef boost::mpl::bool_<
                 boost::detail::is_xchar_to_xchar<Target, src >::value ||
                 boost::detail::is_char_array_to_stdstring<Target, src >::value ||
+                boost::detail::is_char_array_to_booststring<Target, src >::value ||
                 (
                      boost::is_same<Target, src >::value &&
-                     boost::detail::is_stdstring<Target >::value
+                     (boost::detail::is_stdstring<Target >::value || boost::detail::is_booststring<Target >::value)
                 ) ||
                 (
                      boost::is_same<Target, src >::value &&
index 0a4e1ac7aa3d47051757abfcf75109a911734ef1..d83e111c48c0570395ec4e07796c05c6d3e20f62 100644 (file)
@@ -81,7 +81,12 @@ is used.
 #include <float.h>
 #endif
 #ifdef BOOST_MATH_USE_FLOAT128
+#ifdef __has_include
+#if  __has_include("quadmath.h")
 #include "quadmath.h"
+#define BOOST_MATH_HAS_QUADMATH_H
+#endif
+#endif
 #endif
 
 #ifdef BOOST_NO_STDC_NAMESPACE
@@ -124,9 +129,18 @@ inline bool is_nan_helper(T, const boost::false_type&)
 {
    return false;
 }
-#ifdef BOOST_MATH_USE_FLOAT128
+#if defined(BOOST_MATH_USE_FLOAT128) 
+#if defined(BOOST_MATH_HAS_QUADMATH_H)
 inline bool is_nan_helper(__float128 f, const boost::true_type&) { return ::isnanq(f); }
 inline bool is_nan_helper(__float128 f, const boost::false_type&) { return ::isnanq(f); }
+#elif defined(BOOST_GNU_STDLIB) && BOOST_GNU_STDLIB && \
+      _GLIBCXX_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
+inline bool is_nan_helper(__float128 f, const boost::true_type&) { return std::isnan(static_cast<double>(f)); }
+inline bool is_nan_helper(__float128 f, const boost::false_type&) { return std::isnan(static_cast<double>(f)); }
+#else
+inline bool is_nan_helper(__float128 f, const boost::true_type&) { return ::isnan(static_cast<double>(f)); }
+inline bool is_nan_helper(__float128 f, const boost::false_type&) { return ::isnan(static_cast<double>(f)); }
+#endif
 #endif
 }
 
@@ -519,7 +533,7 @@ inline bool (isinf)(long double x)
    return detail::isinf_impl(static_cast<value_type>(x), method());
 }
 #endif
-#ifdef BOOST_MATH_USE_FLOAT128
+#if defined(BOOST_MATH_USE_FLOAT128) && defined(BOOST_MATH_HAS_QUADMATH_H)
 template<>
 inline bool (isinf)(__float128 x)
 {
@@ -611,7 +625,7 @@ inline bool (isnan)(long double x)
    return detail::isnan_impl(x, method());
 }
 #endif
-#ifdef BOOST_MATH_USE_FLOAT128
+#if defined(BOOST_MATH_USE_FLOAT128) && defined(BOOST_MATH_HAS_QUADMATH_H)
 template<>
 inline bool (isnan)(__float128 x)
 {
index ffd0ab43a6be6412d851465983e6677ecb80e084..75d29b646ed174e15372141e222817b9cdbf4dc8 100644 (file)
 #  define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF
 #endif
 //
-// Test whether to support __float128, if we don't have quadmath.h then this can't currently work:
-//
-#ifndef BOOST_MATH_USE_FLOAT128
-#ifdef __has_include
-#if ! __has_include("quadmath.h")
-#define BOOST_MATH_DISABLE_FLOAT128
-#endif
-#elif !defined(BOOST_ARCH_X86)
-#define BOOST_MATH_DISABLE_FLOAT128
-#endif
-#endif
-//
 // And then the actual configuration:
 //
 #if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__) \
index 54aece0b7114c289678120c2cc44d21d5cd17b1f..c9cbec23a1bb60cccfee3e3168f8b7b504c0fd29 100644 (file)
    namespace move_detail {
 
    template <class Ret, class T>
-   inline typename ::boost::move_detail::enable_if_c
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
       <  ::boost::move_detail::is_lvalue_reference<Ret>::value ||
         !::boost::has_move_emulation_enabled<T>::value
       , T&>::type
    }
 
    template <class Ret, class T>
-   inline typename ::boost::move_detail::enable_if_c
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
       < !::boost::move_detail::is_lvalue_reference<Ret>::value &&
          ::boost::has_move_emulation_enabled<T>::value
       , ::boost::rv<T>&>::type
    }
 
    template <class Ret, class T>
-   inline typename ::boost::move_detail::enable_if_c
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
       < !::boost::move_detail::is_lvalue_reference<Ret>::value &&
          ::boost::has_move_emulation_enabled<T>::value
       , ::boost::rv<T>&>::type
    #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\
       BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\
       public:\
-      operator ::boost::rv<TYPE>&() \
+      BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
       {  return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this);  }\
-      operator const ::boost::rv<TYPE>&() const \
+      BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
       {  return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this);  }\
       private:\
    //
       TYPE& operator=(TYPE &t)\
       {  this->operator=(const_cast<const TYPE &>(t)); return *this;}\
       public:\
-      operator ::boost::rv<TYPE>&() \
+      BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
       {  return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this);  }\
-      operator const ::boost::rv<TYPE>&() const \
+      BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
       {  return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this);  }\
       private:\
    //
 
    #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\
       public:\
-      operator ::boost::rv<TYPE>&() \
+      BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
       {  return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this);  }\
-      operator const ::boost::rv<TYPE>&() const \
+      BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
       {  return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this);  }\
       private:\
    //
       BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\
       public:\
       typedef int boost_move_emulation_t;\
+      private:\
    //
 
    //! This macro marks a type as copyable and movable.
       namespace move_detail {
 
       template <class Ret, class T>
-      inline typename ::boost::move_detail::enable_if_c
+      BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
          <  ::boost::move_detail::is_lvalue_reference<Ret>::value
          , T&>::type
             move_return(T& x) BOOST_NOEXCEPT
       }
 
       template <class Ret, class T>
-      inline typename ::boost::move_detail::enable_if_c
+      BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
          < !::boost::move_detail::is_lvalue_reference<Ret>::value
          , Ret && >::type
             move_return(T&& t) BOOST_NOEXCEPT
index 342390b8163e59ecc1ece17a0757c4d5e4086e32..637eb158bd1a63cd1efb2a839a978b25d43aa507 100644 (file)
@@ -16,4 +16,6 @@
 #  pragma warning (disable : 4324) // structure was padded due to __declspec(align())
 #  pragma warning (disable : 4675) // "function":  resolved overload was found by argument-dependent lookup
 #  pragma warning (disable : 4996) // "function": was declared deprecated (_CRT_SECURE_NO_DEPRECATE/_SCL_SECURE_NO_WARNINGS)
+#  pragma warning (disable : 4714) // "function": marked as __forceinline not inlined
+#  pragma warning (disable : 4127) // conditional expression is constant
 #endif
index 323c13af109e2941e44fc7c279ebea7895d3756a..e45394c97d6f59cb453d7d5a44adb0c8f068a1b3 100644 (file)
 #ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
 #define BOOST_MOVE_DETAIL_META_UTILS_HPP
 
-#ifndef BOOST_CONFIG_HPP
-#  include <boost/config.hpp>
-#endif
-#
 #if defined(BOOST_HAS_PRAGMA_ONCE)
 #  pragma once
 #endif
+#include <boost/move/detail/config_begin.hpp>
+#include <boost/move/detail/workaround.hpp>  //forceinline
 #include <boost/move/detail/meta_utils_core.hpp>
 #include <cstddef>   //for std::size_t
 
@@ -245,8 +243,8 @@ template<class T>
 struct addr_impl_ref
 {
    T & v_;
-   inline addr_impl_ref( T & v ): v_( v ) {}
-   inline operator T& () const { return v_; }
+   BOOST_MOVE_FORCEINLINE addr_impl_ref( T & v ): v_( v ) {}
+   BOOST_MOVE_FORCEINLINE operator T& () const { return v_; }
 
    private:
    addr_impl_ref & operator=(const addr_impl_ref &);
@@ -255,18 +253,18 @@ struct addr_impl_ref
 template<class T>
 struct addressof_impl
 {
-   static inline T * f( T & v, long )
+   BOOST_MOVE_FORCEINLINE static T * f( T & v, long )
    {
       return reinterpret_cast<T*>(
          &const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
    }
 
-   static inline T * f( T * v, int )
+   BOOST_MOVE_FORCEINLINE static T * f( T * v, int )
    {  return v;  }
 };
 
 template<class T>
-inline T * addressof( T & v )
+BOOST_MOVE_FORCEINLINE T * addressof( T & v )
 {
    return ::boost::move_detail::addressof_impl<T>::f
       ( ::boost::move_detail::addr_impl_ref<T>( v ), 0 );
@@ -314,6 +312,17 @@ class is_convertible
 
 #endif
 
+template <class T, class U, bool IsSame = is_same<T, U>::value>
+struct is_same_or_convertible
+   : is_convertible<T, U>
+{};
+
+template <class T, class U>
+struct is_same_or_convertible<T, U, true>
+{
+   static const bool value = true;
+};
+
 template<
       bool C
     , typename F1
@@ -347,6 +356,16 @@ struct disable_if_convertible
    : disable_if< is_convertible<T, U>, R>
 {};
 
+template<class T, class U, class R = void>
+struct enable_if_same_or_convertible
+   : enable_if< is_same_or_convertible<T, U>, R>
+{};
+
+template<class T, class U, class R = void>
+struct disable_if_same_or_convertible
+   : disable_if< is_same_or_convertible<T, U>, R>
+{};
+
 //////////////////////////////////////////////////////////////////////////////
 //
 //                         and_
@@ -561,4 +580,6 @@ template< class T > struct remove_rvalue_reference { typedef T type; };
 }  //namespace move_detail {
 }  //namespace boost {
 
+#include <boost/move/detail/config_end.hpp>
+
 #endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
index b3f81b117f9f2072fafa9dfb0a9bae0b4f4eb3f6..befe141e96a491112239d51189d8e3ea04cb704f 100644 (file)
    #define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG
 #endif
 
+#define BOOST_MOVE_DISABLE_FORCEINLINE
+
+#if defined(BOOST_MOVE_DISABLE_FORCEINLINE)
+   #define BOOST_MOVE_FORCEINLINE inline
+#elif defined(BOOST_MOVE_FORCEINLINE_IS_BOOST_FORCELINE)
+   #define BOOST_MOVE_FORCEINLINE BOOST_FORCEINLINE
+#elif defined(BOOST_MSVC) && defined(_DEBUG)
+   //"__forceinline" and MSVC seems to have some bugs in debug mode
+   #define BOOST_MOVE_FORCEINLINE inline
+#else
+   #define BOOST_MOVE_FORCEINLINE BOOST_FORCEINLINE
+#endif
+
 #endif   //#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP
index 8f9c20b65f33d44d83e2405a077328e4e4da69e1..28de7935c86c7a3c05562d2a2ce0231900b77428 100644 (file)
@@ -25,6 +25,7 @@
 #endif
 
 #include <boost/move/detail/config_begin.hpp>
+#include <boost/move/detail/workaround.hpp>  //forceinline
 #include <boost/move/utility_core.hpp>
 #include <boost/move/traits.hpp>
 
@@ -39,7 +40,7 @@
    //////////////////////////////////////////////////////////////////////////////
 
    template <class T>
-   inline typename ::boost::move_detail::enable_if_c
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
       < enable_move_utility_emulation<T>::value && !has_move_emulation_enabled<T>::value
       , typename ::boost::move_detail::add_const<T>::type &
       >::type
@@ -49,7 +50,7 @@
    }
 
    template <class T>
-   inline typename ::boost::move_detail::enable_if_c
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
       < enable_move_utility_emulation<T>::value && has_move_emulation_enabled<T>::value
             && ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value, rv<T>&>::type
          move_if_noexcept(T& x) BOOST_NOEXCEPT
@@ -58,7 +59,7 @@
    }
 
    template <class T>
-   inline typename ::boost::move_detail::enable_if_c
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
       < enable_move_utility_emulation<T>::value && has_move_emulation_enabled<T>::value
             && ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value
       , rv<T>&
@@ -69,7 +70,7 @@
    }
 
    template <class T>
-   inline typename ::boost::move_detail::enable_if_c
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
       < enable_move_utility_emulation<T>::value && has_move_emulation_enabled<T>::value
             && !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value
       , typename ::boost::move_detail::add_const<T>::type &
@@ -80,7 +81,7 @@
    }
 
    template <class T>
-   inline typename ::boost::move_detail::enable_if_c
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
       < enable_move_utility_emulation<T>::value && has_move_emulation_enabled<T>::value
             && !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value
       , typename ::boost::move_detail::add_const<T>::type &
       #else //BOOST_MOVE_DOXYGEN_INVOKED
 
          template <class T>
-         typename ::boost::move_detail::enable_if_c
+         BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
             < ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value, T&&>::type
                move_if_noexcept(T& x) BOOST_NOEXCEPT
          {  return ::boost::move(x);   }
 
          template <class T>
-         typename ::boost::move_detail::enable_if_c
+         BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
             < !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value, const T&>::type
                move_if_noexcept(T& x) BOOST_NOEXCEPT
          {  return x;  }
index 7fd1ea14438eb403b99cbfbbe5c2ffa79bb22942..55042a9bb1568ce25bd13398f816b5f1e9b3235d 100644 (file)
@@ -26,6 +26,7 @@
 #endif
 
 #include <boost/move/detail/config_begin.hpp>
+#include <boost/move/detail/workaround.hpp>  //forceinline
 #include <boost/move/core.hpp>
 #include <boost/move/detail/meta_utils.hpp>
 #include <boost/static_assert.hpp>
@@ -47,7 +48,7 @@
    //////////////////////////////////////////////////////////////////////////////
 
    template <class T>
-   inline typename ::boost::move_detail::enable_if_and
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
       < T &
       , enable_move_utility_emulation<T>
       , has_move_emulation_disabled<T>
@@ -58,7 +59,7 @@
    }
 
    template <class T>
-   inline typename ::boost::move_detail::enable_if_and
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
       < rv<T>&
       , enable_move_utility_emulation<T>
       , has_move_emulation_enabled<T>
@@ -69,7 +70,7 @@
    }
 
    template <class T>
-   inline typename ::boost::move_detail::enable_if_and
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
       < rv<T>&
       , enable_move_utility_emulation<T>
       , has_move_emulation_enabled<T>
@@ -86,7 +87,7 @@
    //////////////////////////////////////////////////////////////////////////////
 
    template <class T>
-   inline typename ::boost::move_detail::enable_if_and
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
       < T &
       , enable_move_utility_emulation<T>
       , ::boost::move_detail::is_rv<T>
@@ -97,7 +98,7 @@
    }
 
    template <class T>
-   inline typename ::boost::move_detail::enable_if_and
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
       < const T &
       , enable_move_utility_emulation<T>
       , ::boost::move_detail::is_not_rv<T>
    //////////////////////////////////////////////////////////////////////////////
 
    template <class T>
-   inline typename ::boost::move_detail::enable_if_and
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
       < T &
       , enable_move_utility_emulation<T>
       , ::boost::move_detail::is_rv<T>
    }
 
    template <class T>
-   inline typename ::boost::move_detail::enable_if_and
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
       < typename ::boost::move_detail::add_lvalue_reference<T>::type
       , enable_move_utility_emulation<T>
       , ::boost::move_detail::is_not_rv<T>
    }
 
    template <class T>
-   inline typename ::boost::move_detail::enable_if_and
+   BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
       < rv<T>&
       , enable_move_utility_emulation<T>
       , ::boost::move_detail::is_not_rv<T>
 
          //Old move approach, lvalues could bind to rvalue references
          template <class T>
-         inline typename ::boost::move_detail::remove_reference<T>::type && move(T&& t) BOOST_NOEXCEPT
+         BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::remove_reference<T>::type && move(T&& t) BOOST_NOEXCEPT
          {  return t;   }
 
       #else //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
 
          template <class T>
-         inline typename ::boost::move_detail::remove_reference<T>::type && move(T&& t) BOOST_NOEXCEPT
+         BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::remove_reference<T>::type && move(T&& t) BOOST_NOEXCEPT
          { return static_cast<typename ::boost::move_detail::remove_reference<T>::type &&>(t); }
 
       #endif   //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
          //Old move approach, lvalues could bind to rvalue references
 
          template <class T>
-         inline T&& forward(typename ::boost::move_detail::identity<T>::type&& t) BOOST_NOEXCEPT
+         BOOST_MOVE_FORCEINLINE T&& forward(typename ::boost::move_detail::identity<T>::type&& t) BOOST_NOEXCEPT
          {  return t;   }
 
       #else //Old move
 
          template <class T>
-         inline T&& forward(typename ::boost::move_detail::remove_reference<T>::type& t) BOOST_NOEXCEPT
+         BOOST_MOVE_FORCEINLINE T&& forward(typename ::boost::move_detail::remove_reference<T>::type& t) BOOST_NOEXCEPT
          {  return static_cast<T&&>(t);   }
 
          template <class T>
-         inline T&& forward(typename ::boost::move_detail::remove_reference<T>::type&& t) BOOST_NOEXCEPT
+         BOOST_MOVE_FORCEINLINE T&& forward(typename ::boost::move_detail::remove_reference<T>::type&& t) BOOST_NOEXCEPT
          {
             //"boost::forward<T> error: 'T' is a lvalue reference, can't forward as rvalue.";
             BOOST_STATIC_ASSERT(!boost::move_detail::is_lvalue_reference<T>::value);
          //Old move approach, lvalues could bind to rvalue references
 
          template <class T>
-         inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::identity<T>::type&& t) BOOST_NOEXCEPT
+         BOOST_MOVE_FORCEINLINE T&& move_if_not_lvalue_reference(typename ::boost::move_detail::identity<T>::type&& t) BOOST_NOEXCEPT
          {  return t;   }
 
       #else //Old move
 
          template <class T>
-         inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference<T>::type& t) BOOST_NOEXCEPT
+         BOOST_MOVE_FORCEINLINE T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference<T>::type& t) BOOST_NOEXCEPT
          {  return static_cast<T&&>(t);   }
 
          template <class T>
-         inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference<T>::type&& t) BOOST_NOEXCEPT
+         BOOST_MOVE_FORCEINLINE T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference<T>::type&& t) BOOST_NOEXCEPT
          {
             //"boost::forward<T> error: 'T' is a lvalue reference, can't forward as rvalue.";
             BOOST_STATIC_ASSERT(!boost::move_detail::is_lvalue_reference<T>::value);
index db744e58accd63ba5ddf81c74987eb9922b2711d..a37c45c5143e1c4803a4d64c383b5a9a39b32800 100644 (file)
@@ -1,5 +1,5 @@
 // Copyright (C) 2003, Fernando Luis Cacciola Carballal.
-// Copyright (C) 2014 Andrzej Krzemienski.
+// Copyright (C) 2014, 2015 Andrzej Krzemienski.
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
index 608cb0c35487eafc60c4f3247ee27f3199caef28..008f369d1cda0a28971645413d2fb6e7a082cf56 100644 (file)
@@ -1,5 +1,5 @@
 // Copyright (C) 2003, Fernando Luis Cacciola Carballal.
-// Copyright (C) 2014 Andrzej Krzemienski.
+// Copyright (C) 2014, 2015 Andrzej Krzemienski.
 //
 // Use, modification, and distribution is subject to the Boost Software
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -29,7 +29,7 @@ class none_t {};
 struct none_t
 {
   struct init_tag{};
-  explicit none_t(init_tag){} // to prevent default constructor
+  explicit none_t(init_tag){} // to disable default constructor
 };
 
 #endif // old implementation workarounds
@@ -37,4 +37,3 @@ struct none_t
 } // namespace boost
 
 #endif // header guard
-
index ab203304c776baa84767126995e602a0956e3b0d..3fc08d5e8db2e43847bcf34fae5d9afb49c0533a 100644 (file)
@@ -1,6 +1,7 @@
 //  Boost operators.hpp header file  ----------------------------------------//
 
 //  (C) Copyright David Abrahams, Jeremy Siek, Daryle Walker 1999-2001.
+//  (C) Copyright Daniel Frey 2002-2016.
 //  Distributed under the Boost Software License, Version 1.0. (See
 //  accompanying file LICENSE_1_0.txt or copy at
 //  http://www.boost.org/LICENSE_1_0.txt)
@@ -8,6 +9,8 @@
 //  See http://www.boost.org/libs/utility/operators.htm for documentation.
 
 //  Revision History
+//  22 Feb 16 Added ADL protection, preserve old work-arounds in
+//            operators_v1.hpp and clean up this file. (Daniel Frey)
 //  16 Dec 10 Limit warning suppression for 4284 to older versions of VC++
 //            (Matthew Bradbury, fixes #4432)
 //  07 Aug 08 Added "euclidean" spelling. (Daniel Frey)
@@ -24,8 +27,8 @@
 //            additional classes for groups of related operators added;
 //            workaround for empty base class optimization
 //            bug of GCC 3.0 (Helmut Zeisel)
-//  25 Jun 01 output_iterator_helper changes: removed default template 
-//            parameters, added support for self-proxying, additional 
+//  25 Jun 01 output_iterator_helper changes: removed default template
+//            parameters, added support for self-proxying, additional
 //            documentation and tests (Aleksey Gurtovoy)
 //  29 May 01 Added operator classes for << and >>.  Added input and output
 //            iterator helper classes.  Added classes to connect equality and
 //  04 Jul 00 Fixed NO_OPERATORS_IN_NAMESPACE bugs, major cleanup and
 //            refactoring of compiler workarounds, additional documentation
 //            (Alexy Gurtovoy and Mark Rodgers with some help and prompting from
-//            Dave Abrahams) 
+//            Dave Abrahams)
 //  28 Jun 00 General cleanup and integration of bugfixes from Mark Rodgers and
 //            Jeremy Siek (Dave Abrahams)
 //  20 Jun 00 Changes to accommodate Borland C++Builder 4 and Borland C++ 5.5
 //            (Mark Rodgers)
 //  20 Jun 00 Minor fixes to the prior revision (Aleksey Gurtovoy)
 //  10 Jun 00 Support for the base class chaining technique was added
-//            (Aleksey Gurtovoy). See documentation and the comments below 
-//            for the details. 
+//            (Aleksey Gurtovoy). See documentation and the comments below
+//            for the details.
 //  12 Dec 99 Initial version with iterator operators (Jeremy Siek)
 //  18 Nov 99 Change name "divideable" to "dividable", remove unnecessary
-//            specializations of dividable, subtractable, modable (Ed Brey) 
+//            specializations of dividable, subtractable, modable (Ed Brey)
 //  17 Nov 99 Add comments (Beman Dawes)
 //            Remove unnecessary specialization of operators<> (Ed Brey)
 //  15 Nov 99 Fix less_than_comparable<T,U> second operand type for first two
@@ -60,8 +63,8 @@
 //  10 Nov 99 Initial version
 
 // 10 Jun 00:
-// An additional optional template parameter was added to most of 
-// operator templates to support the base class chaining technique (see 
+// An additional optional template parameter was added to most of
+// operator templates to support the base class chaining technique (see
 // documentation for the details). Unfortunately, a straightforward
 // implementation of this change would have broken compatibility with the
 // previous version of the library by making it impossible to use the same
 // issue at the cost of some simplicity.
 //
 // One of the complications is an existence of special auxiliary class template
-// 'is_chained_base<>' (see 'detail' namespace below), which is used
+// 'is_chained_base<>' (see 'operators_detail' namespace below), which is used
 // to determine whether its template parameter is a library's operator template
-// or not. You have to specialize 'is_chained_base<>' for each new 
+// or not. You have to specialize 'is_chained_base<>' for each new
 // operator template you add to the library.
 //
-// However, most of the non-trivial implementation details are hidden behind 
+// However, most of the non-trivial implementation details are hidden behind
 // several local macros defined below, and as soon as you understand them,
-// you understand the whole library implementation. 
+// you understand the whole library implementation.
 
 #ifndef BOOST_OPERATORS_HPP
 #define BOOST_OPERATORS_HPP
 
+// If old work-arounds are needed, refer to the preserved version without
+// ADL protection.
+#if defined(BOOST_NO_OPERATORS_IN_NAMESPACE) || defined(BOOST_USE_OPERATORS_V1)
+#include "operators_v1.hpp"
+#else
+
 #include <cstddef>
 #include <iterator>
 
 #endif
 
 #if BOOST_WORKAROUND(BOOST_MSVC, < 1600)
-#   pragma warning( disable : 4284 ) // complaint about return type of 
+#   pragma warning( disable : 4284 ) // complaint about return type of
 #endif                               // operator-> not begin a UDT
 
-namespace boost {
-namespace detail {
-
-template <typename T> class empty_base {};
-
-} // namespace detail
-} // namespace boost
-
 // In this section we supply the xxxx1 and xxxx2 forms of the operator
 // templates, which are explicitly targeted at the 1-type-argument and
-// 2-type-argument operator forms, respectively. Some compilers get confused
-// when inline friend functions are overloaded in namespaces other than the
-// global namespace. When BOOST_NO_OPERATORS_IN_NAMESPACE is defined, all of
-// these templates must go in the global namespace.
+// 2-type-argument operator forms, respectively.
 
-#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE
 namespace boost
 {
-#endif
+namespace operators_impl
+{
+namespace operators_detail
+{
+
+template <typename T> class empty_base {};
+
+} // namespace operators_detail
 
 //  Basic operator classes (contributed by Dave Abrahams) ------------------//
 
 //  Note that friend functions defined in a class are implicitly inline.
 //  See the C++ std, 11.4 [class.friend] paragraph 5
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct less_than_comparable2 : B
 {
      friend bool operator<=(const T& x, const U& y) { return !static_cast<bool>(x > y); }
@@ -132,7 +136,7 @@ struct less_than_comparable2 : B
      friend bool operator>=(const U& x, const T& y) { return !static_cast<bool>(y > x); }
 };
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct less_than_comparable1 : B
 {
      friend bool operator>(const T& x, const T& y)  { return y < x; }
@@ -140,7 +144,7 @@ struct less_than_comparable1 : B
      friend bool operator>=(const T& x, const T& y) { return !static_cast<bool>(x < y); }
 };
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct equality_comparable2 : B
 {
      friend bool operator==(const U& y, const T& x) { return x == y; }
@@ -148,7 +152,7 @@ struct equality_comparable2 : B
      friend bool operator!=(const T& y, const U& x) { return !static_cast<bool>(y == x); }
 };
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct equality_comparable1 : B
 {
      friend bool operator!=(const T& x, const T& y) { return !static_cast<bool>(x == y); }
@@ -166,39 +170,39 @@ struct equality_comparable1 : B
 // If the compiler has no NRVO, this is the best symmetric
 // implementation available.
 
-#define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP )                         \
-template <class T, class U, class B = ::boost::detail::empty_base<T> >        \
-struct NAME##2 : B                                                            \
-{                                                                             \
-  friend T operator OP( const T& lhs, const U& rhs )                          \
-    { T nrv( lhs ); nrv OP##= rhs; return nrv; }                              \
-  friend T operator OP( const U& lhs, const T& rhs )                          \
-    { T nrv( rhs ); nrv OP##= lhs; return nrv; }                              \
-};                                                                            \
-                                                                              \
-template <class T, class B = ::boost::detail::empty_base<T> >                 \
-struct NAME##1 : B                                                            \
-{                                                                             \
-  friend T operator OP( const T& lhs, const T& rhs )                          \
-    { T nrv( lhs ); nrv OP##= rhs; return nrv; }                              \
+#define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP )                   \
+template <class T, class U, class B = operators_detail::empty_base<T> > \
+struct NAME##2 : B                                                      \
+{                                                                       \
+  friend T operator OP( const T& lhs, const U& rhs )                    \
+    { T nrv( lhs ); nrv OP##= rhs; return nrv; }                        \
+  friend T operator OP( const U& lhs, const T& rhs )                    \
+    { T nrv( rhs ); nrv OP##= lhs; return nrv; }                        \
+};                                                                      \
+                                                                        \
+template <class T, class B = operators_detail::empty_base<T> >          \
+struct NAME##1 : B                                                      \
+{                                                                       \
+  friend T operator OP( const T& lhs, const T& rhs )                    \
+    { T nrv( lhs ); nrv OP##= rhs; return nrv; }                        \
 };
 
 #define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP )               \
-template <class T, class U, class B = ::boost::detail::empty_base<T> >  \
+template <class T, class U, class B = operators_detail::empty_base<T> > \
 struct NAME##2 : B                                                      \
 {                                                                       \
   friend T operator OP( const T& lhs, const U& rhs )                    \
     { T nrv( lhs ); nrv OP##= rhs; return nrv; }                        \
 };                                                                      \
                                                                         \
-template <class T, class U, class B = ::boost::detail::empty_base<T> >  \
+template <class T, class U, class B = operators_detail::empty_base<T> > \
 struct BOOST_OPERATOR2_LEFT(NAME) : B                                   \
 {                                                                       \
   friend T operator OP( const U& lhs, const T& rhs )                    \
     { T nrv( lhs ); nrv OP##= rhs; return nrv; }                        \
 };                                                                      \
                                                                         \
-template <class T, class B = ::boost::detail::empty_base<T> >           \
+template <class T, class B = operators_detail::empty_base<T> >          \
 struct NAME##1 : B                                                      \
 {                                                                       \
   friend T operator OP( const T& lhs, const T& rhs )                    \
@@ -213,34 +217,34 @@ struct NAME##1 : B                                                      \
 // optimization opportunities to the compiler :)
 
 #define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP )                   \
-template <class T, class U, class B = ::boost::detail::empty_base<T> >  \
+template <class T, class U, class B = operators_detail::empty_base<T> > \
 struct NAME##2 : B                                                      \
 {                                                                       \
   friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \
   friend T operator OP( const U& lhs, T rhs ) { return rhs OP##= lhs; } \
 };                                                                      \
                                                                         \
-template <class T, class B = ::boost::detail::empty_base<T> >           \
+template <class T, class B = operators_detail::empty_base<T> >          \
 struct NAME##1 : B                                                      \
 {                                                                       \
   friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \
 };
 
 #define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP )               \
-template <class T, class U, class B = ::boost::detail::empty_base<T> >  \
+template <class T, class U, class B = operators_detail::empty_base<T> > \
 struct NAME##2 : B                                                      \
 {                                                                       \
   friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \
 };                                                                      \
                                                                         \
-template <class T, class U, class B = ::boost::detail::empty_base<T> >  \
+template <class T, class U, class B = operators_detail::empty_base<T> > \
 struct BOOST_OPERATOR2_LEFT(NAME) : B                                   \
 {                                                                       \
   friend T operator OP( const U& lhs, const T& rhs )                    \
     { return T( lhs ) OP##= rhs; }                                      \
 };                                                                      \
                                                                         \
-template <class T, class B = ::boost::detail::empty_base<T> >           \
+template <class T, class B = operators_detail::empty_base<T> >          \
 struct NAME##1 : B                                                      \
 {                                                                       \
   friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \
@@ -263,7 +267,7 @@ BOOST_BINARY_OPERATOR_COMMUTATIVE( orable, | )
 
 //  incrementable and decrementable contributed by Jeremy Siek
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct incrementable : B
 {
   friend T operator++(T& x, int)
@@ -276,7 +280,7 @@ private: // The use of this typedef works around a Borland bug
   typedef T incrementable_type;
 };
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct decrementable : B
 {
   friend T operator--(T& x, int)
@@ -291,16 +295,16 @@ private: // The use of this typedef works around a Borland bug
 
 //  Iterator operator classes (contributed by Jeremy Siek) ------------------//
 
-template <class T, class P, class B = ::boost::detail::empty_base<T> >
+template <class T, class P, class B = operators_detail::empty_base<T> >
 struct dereferenceable : B
 {
   P operator->() const
-  { 
-    return &*static_cast<const T&>(*this); 
+  {
+    return &*static_cast<const T&>(*this);
   }
 };
 
-template <class T, class I, class R, class B = ::boost::detail::empty_base<T> >
+template <class T, class I, class R, class B = operators_detail::empty_base<T> >
 struct indexable : B
 {
   R operator[](I n) const
@@ -314,34 +318,34 @@ struct indexable : B
 
 #if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
 
-#define BOOST_BINARY_OPERATOR( NAME, OP )                                     \
-template <class T, class U, class B = ::boost::detail::empty_base<T> >        \
-struct NAME##2 : B                                                            \
-{                                                                             \
-  friend T operator OP( const T& lhs, const U& rhs )                          \
-    { T nrv( lhs ); nrv OP##= rhs; return nrv; }                              \
-};                                                                            \
-                                                                              \
-template <class T, class B = ::boost::detail::empty_base<T> >                 \
-struct NAME##1 : B                                                            \
-{                                                                             \
-  friend T operator OP( const T& lhs, const T& rhs )                          \
-    { T nrv( lhs ); nrv OP##= rhs; return nrv; }                              \
+#define BOOST_BINARY_OPERATOR( NAME, OP )                               \
+template <class T, class U, class B = operators_detail::empty_base<T> > \
+struct NAME##2 : B                                                      \
+{                                                                       \
+  friend T operator OP( const T& lhs, const U& rhs )                    \
+    { T nrv( lhs ); nrv OP##= rhs; return nrv; }                        \
+};                                                                      \
+                                                                        \
+template <class T, class B = operators_detail::empty_base<T> >          \
+struct NAME##1 : B                                                      \
+{                                                                       \
+  friend T operator OP( const T& lhs, const T& rhs )                    \
+    { T nrv( lhs ); nrv OP##= rhs; return nrv; }                        \
 };
 
 #else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
 
-#define BOOST_BINARY_OPERATOR( NAME, OP )                                     \
-template <class T, class U, class B = ::boost::detail::empty_base<T> >        \
-struct NAME##2 : B                                                            \
-{                                                                             \
-  friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; }       \
-};                                                                            \
-                                                                              \
-template <class T, class B = ::boost::detail::empty_base<T> >                 \
-struct NAME##1 : B                                                            \
-{                                                                             \
-  friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; }       \
+#define BOOST_BINARY_OPERATOR( NAME, OP )                               \
+template <class T, class U, class B = operators_detail::empty_base<T> > \
+struct NAME##2 : B                                                      \
+{                                                                       \
+  friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \
+};                                                                      \
+                                                                        \
+template <class T, class B = operators_detail::empty_base<T> >          \
+struct NAME##1 : B                                                      \
+{                                                                       \
+  friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \
 };
 
 #endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
@@ -351,7 +355,7 @@ BOOST_BINARY_OPERATOR( right_shiftable, >> )
 
 #undef BOOST_BINARY_OPERATOR
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct equivalent2 : B
 {
   friend bool operator==(const T& x, const U& y)
@@ -360,7 +364,7 @@ struct equivalent2 : B
   }
 };
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct equivalent1 : B
 {
   friend bool operator==(const T&x, const T&y)
@@ -369,7 +373,7 @@ struct equivalent1 : B
   }
 };
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct partially_ordered2 : B
 {
   friend bool operator<=(const T& x, const U& y)
@@ -386,7 +390,7 @@ struct partially_ordered2 : B
     { return static_cast<bool>(y < x) || static_cast<bool>(y == x); }
 };
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct partially_ordered1 : B
 {
   friend bool operator>(const T& x, const T& y)
@@ -399,161 +403,161 @@ struct partially_ordered1 : B
 
 //  Combined operator classes (contributed by Daryle Walker) ----------------//
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct totally_ordered2
     : less_than_comparable2<T, U
     , equality_comparable2<T, U, B
       > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct totally_ordered1
     : less_than_comparable1<T
     , equality_comparable1<T, B
       > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct additive2
     : addable2<T, U
     , subtractable2<T, U, B
       > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct additive1
     : addable1<T
     , subtractable1<T, B
       > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct multiplicative2
     : multipliable2<T, U
     , dividable2<T, U, B
       > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct multiplicative1
     : multipliable1<T
     , dividable1<T, B
       > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct integer_multiplicative2
     : multiplicative2<T, U
     , modable2<T, U, B
       > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct integer_multiplicative1
     : multiplicative1<T
     , modable1<T, B
       > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct arithmetic2
     : additive2<T, U
     , multiplicative2<T, U, B
       > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct arithmetic1
     : additive1<T
     , multiplicative1<T, B
       > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct integer_arithmetic2
     : additive2<T, U
     , integer_multiplicative2<T, U, B
       > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct integer_arithmetic1
     : additive1<T
     , integer_multiplicative1<T, B
       > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct bitwise2
     : xorable2<T, U
     , andable2<T, U
     , orable2<T, U, B
       > > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct bitwise1
     : xorable1<T
     , andable1<T
     , orable1<T, B
       > > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct unit_steppable
     : incrementable<T
     , decrementable<T, B
       > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct shiftable2
     : left_shiftable2<T, U
     , right_shiftable2<T, U, B
       > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct shiftable1
     : left_shiftable1<T
     , right_shiftable1<T, B
       > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct ring_operators2
     : additive2<T, U
     , subtractable2_left<T, U
     , multipliable2<T, U, B
       > > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct ring_operators1
     : additive1<T
     , multipliable1<T, B
       > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct ordered_ring_operators2
     : ring_operators2<T, U
     , totally_ordered2<T, U, B
       > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct ordered_ring_operators1
     : ring_operators1<T
     , totally_ordered1<T, B
       > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct field_operators2
     : ring_operators2<T, U
     , dividable2<T, U
     , dividable2_left<T, U, B
       > > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct field_operators1
     : ring_operators1<T
     , dividable1<T, B
       > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct ordered_field_operators2
     : field_operators2<T, U
     , totally_ordered2<T, U, B
       > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct ordered_field_operators1
     : field_operators1<T
     , totally_ordered1<T, B
       > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct euclidian_ring_operators2
     : ring_operators2<T, U
     , dividable2<T, U
@@ -562,26 +566,26 @@ struct euclidian_ring_operators2
     , modable2_left<T, U, B
       > > > > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct euclidian_ring_operators1
     : ring_operators1<T
     , dividable1<T
     , modable1<T, B
       > > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct ordered_euclidian_ring_operators2
     : totally_ordered2<T, U
     , euclidian_ring_operators2<T, U, B
       > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct ordered_euclidian_ring_operators1
     : totally_ordered1<T
     , euclidian_ring_operators1<T, B
       > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct euclidean_ring_operators2
     : ring_operators2<T, U
     , dividable2<T, U
@@ -590,43 +594,43 @@ struct euclidean_ring_operators2
     , modable2_left<T, U, B
       > > > > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct euclidean_ring_operators1
     : ring_operators1<T
     , dividable1<T
     , modable1<T, B
       > > > {};
 
-template <class T, class U, class B = ::boost::detail::empty_base<T> >
+template <class T, class U, class B = operators_detail::empty_base<T> >
 struct ordered_euclidean_ring_operators2
     : totally_ordered2<T, U
     , euclidean_ring_operators2<T, U, B
       > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct ordered_euclidean_ring_operators1
     : totally_ordered1<T
     , euclidean_ring_operators1<T, B
       > > {};
 
-template <class T, class P, class B = ::boost::detail::empty_base<T> >
+template <class T, class P, class B = operators_detail::empty_base<T> >
 struct input_iteratable
     : equality_comparable1<T
     , incrementable<T
     , dereferenceable<T, P, B
       > > > {};
 
-template <class T, class B = ::boost::detail::empty_base<T> >
+template <class T, class B = operators_detail::empty_base<T> >
 struct output_iteratable
     : incrementable<T, B
       > {};
 
-template <class T, class P, class B = ::boost::detail::empty_base<T> >
+template <class T, class P, class B = operators_detail::empty_base<T> >
 struct forward_iteratable
     : input_iteratable<T, P, B
       > {};
 
-template <class T, class P, class B = ::boost::detail::empty_base<T> >
+template <class T, class P, class B = operators_detail::empty_base<T> >
 struct bidirectional_iteratable
     : forward_iteratable<T, P
     , decrementable<T, B
@@ -636,7 +640,7 @@ struct bidirectional_iteratable
 //  which is an indirect base class of bidirectional_iterable,
 //  random_access_iteratable must not be derived from totally_ordered1
 //  but from less_than_comparable1 only. (Helmut Zeisel, 02-Dec-2001)
-template <class T, class P, class D, class R, class B = ::boost::detail::empty_base<T> >
+template <class T, class P, class D, class R, class B = operators_detail::empty_base<T> >
 struct random_access_iteratable
     : bidirectional_iteratable<T, P
     , less_than_comparable1<T
@@ -644,124 +648,64 @@ struct random_access_iteratable
     , indexable<T, D, R, B
       > > > > {};
 
-#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE
-} // namespace boost
-#endif // BOOST_NO_OPERATORS_IN_NAMESPACE
-
 
-// BOOST_IMPORT_TEMPLATE1 .. BOOST_IMPORT_TEMPLATE4 -
 //
-// When BOOST_NO_OPERATORS_IN_NAMESPACE is defined we need a way to import an
-// operator template into the boost namespace. BOOST_IMPORT_TEMPLATE1 is used
-// for one-argument forms of operator templates; BOOST_IMPORT_TEMPLATE2 for
-// two-argument forms. Note that these macros expect to be invoked from within
-// boost.
-
-#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE
-
-  // The template is already in boost so we have nothing to do.
-# define BOOST_IMPORT_TEMPLATE4(template_name)
-# define BOOST_IMPORT_TEMPLATE3(template_name)
-# define BOOST_IMPORT_TEMPLATE2(template_name)
-# define BOOST_IMPORT_TEMPLATE1(template_name)
-
-#else // BOOST_NO_OPERATORS_IN_NAMESPACE
-
-#  ifndef BOOST_NO_USING_TEMPLATE
-
-     // Bring the names in with a using-declaration
-     // to avoid stressing the compiler.
-#    define BOOST_IMPORT_TEMPLATE4(template_name) using ::template_name;
-#    define BOOST_IMPORT_TEMPLATE3(template_name) using ::template_name;
-#    define BOOST_IMPORT_TEMPLATE2(template_name) using ::template_name;
-#    define BOOST_IMPORT_TEMPLATE1(template_name) using ::template_name;
-
-#  else
-
-     // Otherwise, because a Borland C++ 5.5 bug prevents a using declaration
-     // from working, we are forced to use inheritance for that compiler.
-#    define BOOST_IMPORT_TEMPLATE4(template_name)                                             \
-     template <class T, class U, class V, class W, class B = ::boost::detail::empty_base<T> > \
-     struct template_name : ::template_name<T, U, V, W, B> {};
-
-#    define BOOST_IMPORT_TEMPLATE3(template_name)                                    \
-     template <class T, class U, class V, class B = ::boost::detail::empty_base<T> > \
-     struct template_name : ::template_name<T, U, V, B> {};
-
-#    define BOOST_IMPORT_TEMPLATE2(template_name)                           \
-     template <class T, class U, class B = ::boost::detail::empty_base<T> > \
-     struct template_name : ::template_name<T, U, B> {};
-
-#    define BOOST_IMPORT_TEMPLATE1(template_name)                  \
-     template <class T, class B = ::boost::detail::empty_base<T> > \
-     struct template_name : ::template_name<T, B> {};
+// Here's where we put it all together, defining the xxxx forms of the templates.
+// We also define specializations of is_chained_base<> for
+// the xxxx, xxxx1, and xxxx2 templates.
+//
 
-#  endif // BOOST_NO_USING_TEMPLATE
+namespace operators_detail
+{
 
-#endif // BOOST_NO_OPERATORS_IN_NAMESPACE
+// A type parameter is used instead of a plain bool because Borland's compiler
+// didn't cope well with the more obvious non-type template parameter.
+struct true_t {};
+struct false_t {};
 
-//
-// Here's where we put it all together, defining the xxxx forms of the templates
-// in namespace boost. We also define specializations of is_chained_base<> for
-// the xxxx, xxxx1, and xxxx2 templates, importing them into boost:: as
-// necessary.
-//
+} // namespace operators_detail
 
 // is_chained_base<> - a traits class used to distinguish whether an operator
 // template argument is being used for base class chaining, or is specifying a
 // 2nd argument type.
 
-namespace boost {
-// A type parameter is used instead of a plain bool because Borland's compiler
-// didn't cope well with the more obvious non-type template parameter.
-namespace detail {
-  struct true_t {};
-  struct false_t {};
-} // namespace detail
-
 // Unspecialized version assumes that most types are not being used for base
 // class chaining. We specialize for the operator templates defined in this
 // library.
 template<class T> struct is_chained_base {
-  typedef ::boost::detail::false_t value;
+  typedef operators_detail::false_t value;
 };
 
-} // namespace boost
-
-// Import a 4-type-argument operator template into boost (if necessary) and
-// provide a specialization of 'is_chained_base<>' for it.
-# define BOOST_OPERATOR_TEMPLATE4(template_name4)                     \
-  BOOST_IMPORT_TEMPLATE4(template_name4)                              \
-  template<class T, class U, class V, class W, class B>               \
-  struct is_chained_base< ::boost::template_name4<T, U, V, W, B> > {  \
-    typedef ::boost::detail::true_t value;                            \
+// Provide a specialization of 'is_chained_base<>'
+// for a 4-type-argument operator template.
+# define BOOST_OPERATOR_TEMPLATE4(template_name4)           \
+  template<class T, class U, class V, class W, class B>     \
+  struct is_chained_base< template_name4<T, U, V, W, B> > { \
+    typedef operators_detail::true_t value;                 \
   };
 
-// Import a 3-type-argument operator template into boost (if necessary) and
-// provide a specialization of 'is_chained_base<>' for it.
-# define BOOST_OPERATOR_TEMPLATE3(template_name3)                     \
-  BOOST_IMPORT_TEMPLATE3(template_name3)                              \
-  template<class T, class U, class V, class B>                        \
-  struct is_chained_base< ::boost::template_name3<T, U, V, B> > {     \
-    typedef ::boost::detail::true_t value;                            \
+// Provide a specialization of 'is_chained_base<>'
+// for a 3-type-argument operator template.
+# define BOOST_OPERATOR_TEMPLATE3(template_name3)        \
+  template<class T, class U, class V, class B>           \
+  struct is_chained_base< template_name3<T, U, V, B> > { \
+    typedef operators_detail::true_t value;              \
   };
 
-// Import a 2-type-argument operator template into boost (if necessary) and
-// provide a specialization of 'is_chained_base<>' for it.
-# define BOOST_OPERATOR_TEMPLATE2(template_name2)                  \
-  BOOST_IMPORT_TEMPLATE2(template_name2)                           \
-  template<class T, class U, class B>                              \
-  struct is_chained_base< ::boost::template_name2<T, U, B> > {     \
-    typedef ::boost::detail::true_t value;                         \
+// Provide a specialization of 'is_chained_base<>'
+// for a 2-type-argument operator template.
+# define BOOST_OPERATOR_TEMPLATE2(template_name2)     \
+  template<class T, class U, class B>                 \
+  struct is_chained_base< template_name2<T, U, B> > { \
+    typedef operators_detail::true_t value;           \
   };
 
-// Import a 1-type-argument operator template into boost (if necessary) and
-// provide a specialization of 'is_chained_base<>' for it.
-# define BOOST_OPERATOR_TEMPLATE1(template_name1)                  \
-  BOOST_IMPORT_TEMPLATE1(template_name1)                           \
-  template<class T, class B>                                       \
-  struct is_chained_base< ::boost::template_name1<T, B> > {        \
-    typedef ::boost::detail::true_t value;                         \
+// Provide a specialization of 'is_chained_base<>'
+// for a 1-type-argument operator template.
+# define BOOST_OPERATOR_TEMPLATE1(template_name1)  \
+  template<class T, class B>                       \
+  struct is_chained_base< template_name1<T, B> > { \
+    typedef operators_detail::true_t value;        \
   };
 
 // BOOST_OPERATOR_TEMPLATE(template_name) defines template_name<> such that it
@@ -778,34 +722,34 @@ template<class T> struct is_chained_base {
 // implementation in terms of either '<template_name>1' or '<template_name>2'.
 //
 
-# define BOOST_OPERATOR_TEMPLATE(template_name)                    \
-template <class T                                                  \
-         ,class U = T                                              \
-         ,class B = ::boost::detail::empty_base<T>                 \
-         ,class O = typename is_chained_base<U>::value             \
-         >                                                         \
-struct template_name : template_name##2<T, U, B> {};               \
-                                                                   \
-template<class T, class U, class B>                                \
-struct template_name<T, U, B, ::boost::detail::true_t>             \
-  : template_name##1<T, U> {};                                     \
-                                                                   \
-template <class T, class B>                                        \
-struct template_name<T, T, B, ::boost::detail::false_t>            \
-  : template_name##1<T, B> {};                                     \
-                                                                   \
-template<class T, class U, class B, class O>                       \
-struct is_chained_base< ::boost::template_name<T, U, B, O> > {     \
-  typedef ::boost::detail::true_t value;                           \
-};                                                                 \
-                                                                   \
-BOOST_OPERATOR_TEMPLATE2(template_name##2)                         \
+# define BOOST_OPERATOR_TEMPLATE(template_name)                                       \
+template <class T                                                                     \
+         ,class U = T                                                                 \
+         ,class B = operators_detail::empty_base<T>                                   \
+         ,class O = typename is_chained_base<U>::value                                \
+         >                                                                            \
+struct template_name;                                                                 \
+                                                                                      \
+template<class T, class U, class B>                                                   \
+struct template_name<T, U, B, operators_detail::false_t>                              \
+  : template_name##2<T, U, B> {};                                                     \
+                                                                                      \
+template<class T, class U>                                                            \
+struct template_name<T, U, operators_detail::empty_base<T>, operators_detail::true_t> \
+  : template_name##1<T, U> {};                                                        \
+                                                                                      \
+template <class T, class B>                                                           \
+struct template_name<T, T, B, operators_detail::false_t>                              \
+  : template_name##1<T, B> {};                                                        \
+                                                                                      \
+template<class T, class U, class B, class O>                                          \
+struct is_chained_base< template_name<T, U, B, O> > {                                 \
+  typedef operators_detail::true_t value;                                             \
+};                                                                                    \
+                                                                                      \
+BOOST_OPERATOR_TEMPLATE2(template_name##2)                                            \
 BOOST_OPERATOR_TEMPLATE1(template_name##1)
 
-
-
-namespace boost {
-    
 BOOST_OPERATOR_TEMPLATE(less_than_comparable)
 BOOST_OPERATOR_TEMPLATE(equality_comparable)
 BOOST_OPERATOR_TEMPLATE(multipliable)
@@ -859,13 +803,7 @@ BOOST_OPERATOR_TEMPLATE4(random_access_iteratable)
 #undef BOOST_OPERATOR_TEMPLATE3
 #undef BOOST_OPERATOR_TEMPLATE2
 #undef BOOST_OPERATOR_TEMPLATE1
-#undef BOOST_IMPORT_TEMPLATE1
-#undef BOOST_IMPORT_TEMPLATE2
-#undef BOOST_IMPORT_TEMPLATE3
-#undef BOOST_IMPORT_TEMPLATE4
 
-// The following 'operators' classes can only be used portably if the derived class
-// declares ALL of the required member operators.
 template <class T, class U>
 struct operators2
     : totally_ordered2<T,U
@@ -927,7 +865,7 @@ struct bidirectional_iterator_helper
     > > {};
 
 template <class T,
-          class V, 
+          class V,
           class D = std::ptrdiff_t,
           class P = V*,
           class R = V&>
@@ -941,10 +879,14 @@ struct random_access_iterator_helper
   }
 }; // random_access_iterator_helper
 
+} // namespace operators_impl
+using namespace operators_impl;
+
 } // namespace boost
 
 #if defined(__sgi) && !defined(__GNUC__)
 #pragma reset woff 1234
 #endif
 
+#endif // BOOST_NO_OPERATORS_IN_NAMESPACE
 #endif // BOOST_OPERATORS_HPP
diff --git a/3rdparty/boost/boost/optional/detail/old_optional_implementation.hpp b/3rdparty/boost/boost/optional/detail/old_optional_implementation.hpp
new file mode 100644 (file)
index 0000000..f2e6718
--- /dev/null
@@ -0,0 +1,1059 @@
+// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
+// Copyright (C) 2014-2016 Andrzej Krzemienski.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the maintainer at:
+//  akrzemi1@gmail.com
+
+#ifndef BOOST_OPTIONAL_DETAIL_OLD_OPTIONAL_IMPLEMENTATION_AJK_28JAN2015_HPP
+#define BOOST_OPTIONAL_DETAIL_OLD_OPTIONAL_IMPLEMENTATION_AJK_28JAN2015_HPP
+
+#include <boost/detail/reference_content.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/type_traits/is_reference.hpp>
+
+namespace boost {
+
+namespace optional_detail {
+
+
+template<class T>
+struct types_when_isnt_ref
+{
+  typedef T const& reference_const_type ;
+  typedef T &      reference_type ;
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+  typedef T &&     rval_reference_type ;
+  typedef T &&     reference_type_of_temporary_wrapper;
+#ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
+  // GCC 4.4 has support for an early draft of rvalue references. The conforming version below
+  // causes warnings about returning references to a temporary.
+  static T&& move(T&& r) { return r; }
+#else
+  static rval_reference_type move(reference_type r) { return boost::move(r); }
+#endif
+#endif
+  typedef T const* pointer_const_type ;
+  typedef T *      pointer_type ;
+  typedef T const& argument_type ;
+} ;
+
+template<class T>
+struct types_when_is_ref
+{
+  typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type raw_type ;
+
+  typedef raw_type&  reference_const_type ;
+  typedef raw_type&  reference_type ;
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+  typedef BOOST_DEDUCED_TYPENAME remove_const<raw_type>::type&& rval_reference_type ;
+  typedef raw_type&  reference_type_of_temporary_wrapper;
+  static reference_type move(reference_type r) { return r; }
+#endif
+  typedef raw_type*  pointer_const_type ;
+  typedef raw_type*  pointer_type ;
+  typedef raw_type&  argument_type ;
+} ;
+
+template <class To, class From>
+void prevent_binding_rvalue_ref_to_optional_lvalue_ref()
+{
+#ifndef BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES
+  BOOST_STATIC_ASSERT_MSG(
+    !boost::is_lvalue_reference<To>::value || !boost::is_rvalue_reference<From>::value, 
+    "binding rvalue references to optional lvalue references is disallowed");
+#endif    
+}
+
+struct optional_tag {} ;
+
+template<class T>
+class optional_base : public optional_tag
+{
+  private :
+
+    typedef
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+    BOOST_DEDUCED_TYPENAME
+#endif
+    ::boost::detail::make_reference_content<T>::type internal_type ;
+
+    typedef aligned_storage<internal_type> storage_type ;
+
+    typedef types_when_isnt_ref<T> types_when_not_ref ;
+    typedef types_when_is_ref<T>   types_when_ref   ;
+
+    typedef optional_base<T> this_type ;
+
+  protected :
+
+    typedef T value_type ;
+
+    typedef mpl::true_  is_reference_tag ;
+    typedef mpl::false_ is_not_reference_tag ;
+
+    typedef BOOST_DEDUCED_TYPENAME is_reference<T>::type is_reference_predicate ;
+
+  public:
+    typedef BOOST_DEDUCED_TYPENAME mpl::if_<is_reference_predicate,types_when_ref,types_when_not_ref>::type types ;
+
+  protected:
+    typedef BOOST_DEDUCED_TYPENAME types::reference_type       reference_type ;
+    typedef BOOST_DEDUCED_TYPENAME types::reference_const_type reference_const_type ;
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    typedef BOOST_DEDUCED_TYPENAME types::rval_reference_type  rval_reference_type ;
+    typedef BOOST_DEDUCED_TYPENAME types::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper ;
+#endif
+    typedef BOOST_DEDUCED_TYPENAME types::pointer_type         pointer_type ;
+    typedef BOOST_DEDUCED_TYPENAME types::pointer_const_type   pointer_const_type ;
+    typedef BOOST_DEDUCED_TYPENAME types::argument_type        argument_type ;
+
+    // Creates an optional<T> uninitialized.
+    // No-throw
+    optional_base()
+      :
+      m_initialized(false) {}
+
+    // Creates an optional<T> uninitialized.
+    // No-throw
+    optional_base ( none_t )
+      :
+      m_initialized(false) {}
+
+    // Creates an optional<T> initialized with 'val'.
+    // Can throw if T::T(T const&) does
+    optional_base ( argument_type val )
+      :
+      m_initialized(false)
+    {
+        construct(val);
+    }
+
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    // move-construct an optional<T> initialized from an rvalue-ref to 'val'.
+    // Can throw if T::T(T&&) does
+    optional_base ( rval_reference_type val )
+      :
+      m_initialized(false)
+    {
+      construct( boost::move(val) );
+    }
+#endif
+
+    // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialzed optional<T>.
+    // Can throw if T::T(T const&) does
+    optional_base ( bool cond, argument_type val )
+      :
+      m_initialized(false)
+    {
+      if ( cond )
+        construct(val);
+    }
+
+    // Creates a deep copy of another optional<T>
+    // Can throw if T::T(T const&) does
+    optional_base ( optional_base const& rhs )
+      :
+      m_initialized(false)
+    {
+      if ( rhs.is_initialized() )
+        construct(rhs.get_impl());
+    }
+
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    // Creates a deep move of another optional<T>
+    // Can throw if T::T(T&&) does
+    optional_base ( optional_base&& rhs )
+      :
+      m_initialized(false)
+    {
+      if ( rhs.is_initialized() )
+        construct( boost::move(rhs.get_impl()) );
+    }
+#endif
+
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+    template<class Expr, class PtrExpr>
+    explicit optional_base ( Expr&& expr, PtrExpr const* tag )
+      :
+      m_initialized(false)
+    {
+      construct(boost::forward<Expr>(expr),tag);
+    }
+
+#else
+    // This is used for both converting and in-place constructions.
+    // Derived classes use the 'tag' to select the appropriate
+    // implementation (the correct 'construct()' overload)
+    template<class Expr>
+    explicit optional_base ( Expr const& expr, Expr const* tag )
+      :
+      m_initialized(false)
+    {
+      construct(expr,tag);
+    }
+
+#endif
+
+
+    // No-throw (assuming T::~T() doesn't)
+    ~optional_base() { destroy() ; }
+
+    // Assigns from another optional<T> (deep-copies the rhs value)
+    void assign ( optional_base const& rhs )
+    {
+      if (is_initialized())
+      {
+        if ( rhs.is_initialized() )
+             assign_value(rhs.get_impl(), is_reference_predicate() );
+        else destroy();
+      }
+      else
+      {
+        if ( rhs.is_initialized() )
+          construct(rhs.get_impl());
+      }
+    }
+    
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    // Assigns from another optional<T> (deep-moves the rhs value)
+    void assign ( optional_base&& rhs )
+    {
+      if (is_initialized())
+      {
+        if ( rhs.is_initialized() )
+             assign_value(boost::move(rhs.get_impl()), is_reference_predicate() );
+        else destroy();
+      }
+      else
+      {
+        if ( rhs.is_initialized() )
+          construct(boost::move(rhs.get_impl()));
+      }
+    }
+#endif 
+
+    // Assigns from another _convertible_ optional<U> (deep-copies the rhs value)
+    template<class U>
+    void assign ( optional<U> const& rhs )
+    {
+      if (is_initialized())
+      {
+        if ( rhs.is_initialized() )
+#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
+          assign_value(rhs.get(), is_reference_predicate() );
+#else
+          assign_value(static_cast<value_type>(rhs.get()), is_reference_predicate() );
+#endif
+          
+        else destroy();
+      }
+      else
+      {
+        if ( rhs.is_initialized() )
+#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
+          construct(rhs.get());
+#else
+          construct(static_cast<value_type>(rhs.get()));
+#endif
+      }
+    }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    // move-assigns from another _convertible_ optional<U> (deep-moves from the rhs value)
+    template<class U>
+    void assign ( optional<U>&& rhs )
+    {
+      typedef BOOST_DEDUCED_TYPENAME optional<U>::rval_reference_type ref_type;
+      if (is_initialized())
+      {
+        if ( rhs.is_initialized() )
+             assign_value(static_cast<ref_type>(rhs.get()), is_reference_predicate() );
+        else destroy();
+      }
+      else
+      {
+        if ( rhs.is_initialized() )
+          construct(static_cast<ref_type>(rhs.get()));
+      }
+    }
+#endif
+    
+    // Assigns from a T (deep-copies the rhs value)
+    void assign ( argument_type val )
+    {
+      if (is_initialized())
+           assign_value(val, is_reference_predicate() );
+      else construct(val);
+    }
+    
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    // Assigns from a T (deep-moves the rhs value)
+    void assign ( rval_reference_type val )
+    {
+      if (is_initialized())
+           assign_value( boost::move(val), is_reference_predicate() );
+      else construct( boost::move(val) );
+    }
+#endif
+
+    // Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED
+    // No-throw (assuming T::~T() doesn't)
+    void assign ( none_t ) BOOST_NOEXCEPT { destroy(); }
+
+#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    template<class Expr, class ExprPtr>
+    void assign_expr ( Expr&& expr, ExprPtr const* tag )
+    {
+      if (is_initialized())
+        assign_expr_to_initialized(boost::forward<Expr>(expr),tag);
+      else construct(boost::forward<Expr>(expr),tag);
+    }
+#else
+    template<class Expr>
+    void assign_expr ( Expr const& expr, Expr const* tag )
+    {
+      if (is_initialized())
+        assign_expr_to_initialized(expr,tag);
+      else construct(expr,tag);
+    }
+#endif
+
+#endif
+
+  public :
+
+    // **DEPPRECATED** Destroys the current value, if any, leaving this UNINITIALIZED
+    // No-throw (assuming T::~T() doesn't)
+    void reset() BOOST_NOEXCEPT { destroy(); }
+
+    // **DEPPRECATED** Replaces the current value -if any- with 'val'
+    void reset ( argument_type val ) { assign(val); }
+
+    // Returns a pointer to the value if this is initialized, otherwise,
+    // returns NULL.
+    // No-throw
+    pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; }
+    pointer_type       get_ptr()       { return m_initialized ? get_ptr_impl() : 0 ; }
+
+    bool is_initialized() const { return m_initialized ; }
+
+  protected :
+
+    void construct ( argument_type val )
+     {
+       ::new (m_storage.address()) internal_type(val) ;
+       m_initialized = true ;
+     }
+     
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    void construct ( rval_reference_type val )
+     {
+       ::new (m_storage.address()) internal_type( types::move(val) ) ;
+       m_initialized = true ;
+     }
+#endif
+
+
+#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+    // Constructs in-place
+    // upon exception *this is always uninitialized
+    template<class... Args>
+    void emplace_assign ( Args&&... args )
+     {
+       destroy();
+       ::new (m_storage.address()) internal_type( boost::forward<Args>(args)... );
+       m_initialized = true ;
+     }
+#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+    template<class Arg>
+    void emplace_assign ( Arg&& arg )
+     {
+       destroy();
+       ::new (m_storage.address()) internal_type( boost::forward<Arg>(arg) );
+       m_initialized = true ;
+     }
+     
+    void emplace_assign ()
+     {
+       destroy();
+       ::new (m_storage.address()) internal_type();
+       m_initialized = true ;
+     }
+#else
+    template<class Arg>
+    void emplace_assign ( const Arg& arg )
+     {
+       destroy();
+       ::new (m_storage.address()) internal_type( arg );
+       m_initialized = true ;
+     }
+     
+    template<class Arg>
+    void emplace_assign ( Arg& arg )
+     {
+       destroy();
+       ::new (m_storage.address()) internal_type( arg );
+       m_initialized = true ;
+     }
+     
+    void emplace_assign ()
+     {
+       destroy();
+       ::new (m_storage.address()) internal_type();
+       m_initialized = true ;
+     }
+#endif
+
+#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    // Constructs in-place using the given factory
+    template<class Expr>
+    void construct ( Expr&& factory, in_place_factory_base const* )
+     {
+       BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
+       boost_optional_detail::construct<value_type>(factory, m_storage.address());
+       m_initialized = true ;
+     }
+
+    // Constructs in-place using the given typed factory
+    template<class Expr>
+    void construct ( Expr&& factory, typed_in_place_factory_base const* )
+     {
+       BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
+       factory.apply(m_storage.address()) ;
+       m_initialized = true ;
+     }
+
+    template<class Expr>
+    void assign_expr_to_initialized ( Expr&& factory, in_place_factory_base const* tag )
+     {
+       destroy();
+       construct(factory,tag);
+     }
+
+    // Constructs in-place using the given typed factory
+    template<class Expr>
+    void assign_expr_to_initialized ( Expr&& factory, typed_in_place_factory_base const* tag )
+     {
+       destroy();
+       construct(factory,tag);
+     }
+
+#else
+    // Constructs in-place using the given factory
+    template<class Expr>
+    void construct ( Expr const& factory, in_place_factory_base const* )
+     {
+       BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
+       boost_optional_detail::construct<value_type>(factory, m_storage.address());
+       m_initialized = true ;
+     }
+
+    // Constructs in-place using the given typed factory
+    template<class Expr>
+    void construct ( Expr const& factory, typed_in_place_factory_base const* )
+     {
+       BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
+       factory.apply(m_storage.address()) ;
+       m_initialized = true ;
+     }
+
+    template<class Expr>
+    void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag )
+     {
+       destroy();
+       construct(factory,tag);
+     }
+
+    // Constructs in-place using the given typed factory
+    template<class Expr>
+    void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag )
+     {
+       destroy();
+       construct(factory,tag);
+     }
+#endif
+
+#endif
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    // Constructs using any expression implicitly convertible to the single argument
+    // of a one-argument T constructor.
+    // Converting constructions of optional<T> from optional<U> uses this function with
+    // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
+    template<class Expr>
+    void construct ( Expr&& expr, void const* )
+    {
+      new (m_storage.address()) internal_type(boost::forward<Expr>(expr)) ;
+      m_initialized = true ;
+    }
+
+    // Assigns using a form any expression implicitly convertible to the single argument
+    // of a T's assignment operator.
+    // Converting assignments of optional<T> from optional<U> uses this function with
+    // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
+    template<class Expr>
+    void assign_expr_to_initialized ( Expr&& expr, void const* )
+    {
+      assign_value(boost::forward<Expr>(expr), is_reference_predicate());
+    }
+#else
+    // Constructs using any expression implicitly convertible to the single argument
+    // of a one-argument T constructor.
+    // Converting constructions of optional<T> from optional<U> uses this function with
+    // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
+    template<class Expr>
+    void construct ( Expr const& expr, void const* )
+     {
+       new (m_storage.address()) internal_type(expr) ;
+       m_initialized = true ;
+     }
+
+    // Assigns using a form any expression implicitly convertible to the single argument
+    // of a T's assignment operator.
+    // Converting assignments of optional<T> from optional<U> uses this function with
+    // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
+    template<class Expr>
+    void assign_expr_to_initialized ( Expr const& expr, void const* )
+     {
+       assign_value(expr, is_reference_predicate());
+     }
+
+#endif
+
+#ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
+    // BCB5.64 (and probably lower versions) workaround.
+    //   The in-place factories are supported by means of catch-all constructors
+    //   and assignment operators (the functions are parameterized in terms of
+    //   an arbitrary 'Expr' type)
+    //   This compiler incorrectly resolves the overload set and sinks optional<T> and optional<U>
+    //   to the 'Expr'-taking functions even though explicit overloads are present for them.
+    //   Thus, the following overload is needed to properly handle the case when the 'lhs'
+    //   is another optional.
+    //
+    // For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error
+    // instead of choosing the wrong overload
+    //
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    // Notice that 'Expr' will be optional<T> or optional<U> (but not optional_base<..>)
+    template<class Expr>
+    void construct ( Expr&& expr, optional_tag const* )
+     {
+       if ( expr.is_initialized() )
+       {
+         // An exception can be thrown here.
+         // It it happens, THIS will be left uninitialized.
+         new (m_storage.address()) internal_type(types::move(expr.get())) ;
+         m_initialized = true ;
+       }
+     }
+#else
+    // Notice that 'Expr' will be optional<T> or optional<U> (but not optional_base<..>)
+    template<class Expr>
+    void construct ( Expr const& expr, optional_tag const* )
+     {
+       if ( expr.is_initialized() )
+       {
+         // An exception can be thrown here.
+         // It it happens, THIS will be left uninitialized.
+         new (m_storage.address()) internal_type(expr.get()) ;
+         m_initialized = true ;
+       }
+     }
+#endif
+#endif // defined BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
+
+    void assign_value ( argument_type val, is_not_reference_tag ) { get_impl() = val; }
+    void assign_value ( argument_type val, is_reference_tag     ) { construct(val); }
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    void assign_value ( rval_reference_type val, is_not_reference_tag ) { get_impl() = static_cast<rval_reference_type>(val); }
+    void assign_value ( rval_reference_type val, is_reference_tag     ) { construct( static_cast<rval_reference_type>(val) ); }
+#endif
+
+    void destroy()
+    {
+      if ( m_initialized )
+        destroy_impl(is_reference_predicate()) ;
+    }
+
+    reference_const_type get_impl() const { return dereference(get_object(), is_reference_predicate() ) ; }
+    reference_type       get_impl()       { return dereference(get_object(), is_reference_predicate() ) ; }
+
+    pointer_const_type get_ptr_impl() const { return cast_ptr(get_object(), is_reference_predicate() ) ; }
+    pointer_type       get_ptr_impl()       { return cast_ptr(get_object(), is_reference_predicate() ) ; }
+
+  private :
+
+    // internal_type can be either T or reference_content<T>
+#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
+    // This workaround is supposed to silence GCC warnings about broken strict aliasing rules
+    internal_type const* get_object() const
+    {
+        union { void const* ap_pvoid; internal_type const* as_ptype; } caster = { m_storage.address() };
+        return caster.as_ptype;
+    }
+    internal_type *      get_object()
+    {
+        union { void* ap_pvoid; internal_type* as_ptype; } caster = { m_storage.address() };
+        return caster.as_ptype;
+    }
+#else
+    internal_type const* get_object() const { return static_cast<internal_type const*>(m_storage.address()); }
+    internal_type *      get_object()       { return static_cast<internal_type *>     (m_storage.address()); }
+#endif
+
+    // reference_content<T> lacks an implicit conversion to T&, so the following is needed to obtain a proper reference.
+    reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; }
+    reference_type       dereference( internal_type*       p, is_not_reference_tag )       { return *p ; }
+    reference_const_type dereference( internal_type const* p, is_reference_tag     ) const { return p->get() ; }
+    reference_type       dereference( internal_type*       p, is_reference_tag     )       { return p->get() ; }
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
+    void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->internal_type::~internal_type() ; m_initialized = false ; }
+#else
+    void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->~T() ; m_initialized = false ; }
+#endif
+
+    void destroy_impl ( is_reference_tag     ) { m_initialized = false ; }
+
+    // If T is of reference type, trying to get a pointer to the held value must result in a compile-time error.
+    // Decent compilers should disallow conversions from reference_content<T>* to T*, but just in case,
+    // the following olverloads are used to filter out the case and guarantee an error in case of T being a reference.
+    pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; }
+    pointer_type       cast_ptr( internal_type *      p, is_not_reference_tag )       { return p ; }
+    pointer_const_type cast_ptr( internal_type const* p, is_reference_tag     ) const { return &p->get() ; }
+    pointer_type       cast_ptr( internal_type *      p, is_reference_tag     )       { return &p->get() ; }
+
+    bool m_initialized ;
+    storage_type m_storage ;
+} ;
+
+} // namespace optional_detail
+
+template<class T>
+class optional : public optional_detail::optional_base<T>
+{
+    typedef optional_detail::optional_base<T> base ;
+
+  public :
+
+    typedef optional<T> this_type ;
+
+    typedef BOOST_DEDUCED_TYPENAME base::value_type           value_type ;
+    typedef BOOST_DEDUCED_TYPENAME base::reference_type       reference_type ;
+    typedef BOOST_DEDUCED_TYPENAME base::reference_const_type reference_const_type ;
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    typedef BOOST_DEDUCED_TYPENAME base::rval_reference_type  rval_reference_type ;
+    typedef BOOST_DEDUCED_TYPENAME base::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper ;
+#endif
+    typedef BOOST_DEDUCED_TYPENAME base::pointer_type         pointer_type ;
+    typedef BOOST_DEDUCED_TYPENAME base::pointer_const_type   pointer_const_type ;
+    typedef BOOST_DEDUCED_TYPENAME base::argument_type        argument_type ;
+
+    // Creates an optional<T> uninitialized.
+    // No-throw
+    optional() BOOST_NOEXCEPT : base() {}
+
+    // Creates an optional<T> uninitialized.
+    // No-throw
+    optional( none_t none_ ) BOOST_NOEXCEPT : base(none_) {}
+
+    // Creates an optional<T> initialized with 'val'.
+    // Can throw if T::T(T const&) does
+    optional ( argument_type val ) : base(val) {}
+
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    // Creates an optional<T> initialized with 'move(val)'.
+    // Can throw if T::T(T &&) does
+    optional ( rval_reference_type val ) : base( boost::forward<T>(val) ) 
+      {optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, rval_reference_type>();}
+#endif
+
+    // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional.
+    // Can throw if T::T(T const&) does
+    optional ( bool cond, argument_type val ) : base(cond,val) {}
+
+    // NOTE: MSVC needs templated versions first
+
+    // Creates a deep copy of another convertible optional<U>
+    // Requires a valid conversion from U to T.
+    // Can throw if T::T(U const&) does
+    template<class U>
+    explicit optional ( optional<U> const& rhs )
+      :
+      base()
+    {
+      if ( rhs.is_initialized() )
+        this->construct(rhs.get());
+    }
+    
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    // Creates a deep move of another convertible optional<U>
+    // Requires a valid conversion from U to T.
+    // Can throw if T::T(U&&) does
+    template<class U>
+    explicit optional ( optional<U> && rhs )
+      :
+      base()
+    {
+      if ( rhs.is_initialized() )
+        this->construct( boost::move(rhs.get()) );
+    }
+#endif
+
+#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+    // Creates an optional<T> with an expression which can be either
+    //  (a) An instance of InPlaceFactory (i.e. in_place(a,b,...,n);
+    //  (b) An instance of TypedInPlaceFactory ( i.e. in_place<T>(a,b,...,n);
+    //  (c) Any expression implicitly convertible to the single type
+    //      of a one-argument T's constructor.
+    //  (d*) Weak compilers (BCB) might also resolved Expr as optional<T> and optional<U>
+    //       even though explicit overloads are present for these.
+    // Depending on the above some T ctor is called.
+    // Can throw if the resolved T ctor throws.
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+
+  template<class Expr>
+  explicit optional ( Expr&& expr, 
+                      BOOST_DEDUCED_TYPENAME boost::disable_if_c<
+                        (boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type>::value) || 
+                        boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type, none_t>::value >::type* = 0 
+  ) 
+    : base(boost::forward<Expr>(expr),boost::addressof(expr)) 
+    {optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, Expr&&>();}
+
+#else
+    template<class Expr>
+    explicit optional ( Expr const& expr ) : base(expr,boost::addressof(expr)) {}
+#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+#endif // !defined BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+
+    // Creates a deep copy of another optional<T>
+    // Can throw if T::T(T const&) does
+    optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {}
+
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+       // Creates a deep move of another optional<T>
+       // Can throw if T::T(T&&) does
+       optional ( optional && rhs ) 
+         BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
+         : base( boost::move(rhs) ) 
+       {}
+
+#endif
+   // No-throw (assuming T::~T() doesn't)
+    ~optional() {}
+
+#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
+    // Assigns from an expression. See corresponding constructor.
+    // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+    template<class Expr>
+    BOOST_DEDUCED_TYPENAME boost::disable_if_c<
+      boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type>::value || 
+        boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type, none_t>::value,
+      optional&
+    >::type 
+    operator= ( Expr&& expr )
+      {
+        optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, Expr&&>();
+        this->assign_expr(boost::forward<Expr>(expr),boost::addressof(expr));
+        return *this ;
+      }
+
+#else
+    template<class Expr>
+    optional& operator= ( Expr const& expr )
+      {
+        this->assign_expr(expr,boost::addressof(expr));
+        return *this ;
+      }
+#endif // !defined  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+#endif // !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
+
+    // Copy-assigns from another convertible optional<U> (converts && deep-copies the rhs value)
+    // Requires a valid conversion from U to T.
+    // Basic Guarantee: If T::T( U const& ) throws, this is left UNINITIALIZED
+    template<class U>
+    optional& operator= ( optional<U> const& rhs )
+      {
+        this->assign(rhs);
+        return *this ;
+      }
+      
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    // Move-assigns from another convertible optional<U> (converts && deep-moves the rhs value)
+    // Requires a valid conversion from U to T.
+    // Basic Guarantee: If T::T( U && ) throws, this is left UNINITIALIZED
+    template<class U>
+    optional& operator= ( optional<U> && rhs )
+      {
+        this->assign(boost::move(rhs));
+        return *this ;
+      }
+#endif
+
+    // Assigns from another optional<T> (deep-copies the rhs value)
+    // Basic Guarantee: If T::T( T const& ) throws, this is left UNINITIALIZED
+    //  (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw)
+    optional& operator= ( optional const& rhs )
+      {
+        this->assign( static_cast<base const&>(rhs) ) ;
+        return *this ;
+      }
+
+#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    // Assigns from another optional<T> (deep-moves the rhs value)
+    optional& operator= ( optional && rhs ) 
+         BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
+      {
+        this->assign( static_cast<base &&>(rhs) ) ;
+        return *this ;
+      }
+#endif
+
+    // Assigns from a T (deep-copies the rhs value)
+    // Basic Guarantee: If T::( T const& ) throws, this is left UNINITIALIZED
+    optional& operator= ( argument_type val )
+      {
+        this->assign( val ) ;
+        return *this ;
+      }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    // Assigns from a T (deep-moves the rhs value)
+    optional& operator= ( rval_reference_type val )
+      {
+        optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, rval_reference_type>();
+        this->assign( boost::move(val) ) ;
+        return *this ;
+      }
+#endif
+
+    // Assigns from a "none"
+    // Which destroys the current value, if any, leaving this UNINITIALIZED
+    // No-throw (assuming T::~T() doesn't)
+    optional& operator= ( none_t none_ ) BOOST_NOEXCEPT
+      {
+        this->assign( none_ ) ;
+        return *this ;
+      }
+      
+#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+    // Constructs in-place
+    // upon exception *this is always uninitialized
+    template<class... Args>
+    void emplace ( Args&&... args )
+     {
+       this->emplace_assign( boost::forward<Args>(args)... );
+     }
+#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+    template<class Arg>
+    void emplace ( Arg&& arg )
+     {
+       this->emplace_assign( boost::forward<Arg>(arg) );
+     }
+     
+    void emplace ()
+     {
+       this->emplace_assign();
+     }
+#else
+    template<class Arg>
+    void emplace ( const Arg& arg )
+     {
+       this->emplace_assign( arg );
+     }
+     
+    template<class Arg>
+    void emplace ( Arg& arg )
+     {
+       this->emplace_assign( arg );
+     }
+     
+    void emplace ()
+     {
+       this->emplace_assign();
+     }
+#endif
+
+    void swap( optional & arg )
+         BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
+      {
+        // allow for Koenig lookup
+        boost::swap(*this, arg);
+      }
+
+
+    // Returns a reference to the value if this is initialized, otherwise,
+    // the behaviour is UNDEFINED
+    // No-throw
+    reference_const_type get() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
+    reference_type       get()       { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
+
+    // Returns a copy of the value if this is initialized, 'v' otherwise
+    reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; }
+    reference_type       get_value_or ( reference_type       v )       { return this->is_initialized() ? get() : v ; }
+
+    // Returns a pointer to the value if this is initialized, otherwise,
+    // the behaviour is UNDEFINED
+    // No-throw
+    pointer_const_type operator->() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; }
+    pointer_type       operator->()       { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; }
+
+    // Returns a reference to the value if this is initialized, otherwise,
+    // the behaviour is UNDEFINED
+    // No-throw
+#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) 
+    reference_const_type operator *() const& { return this->get() ; }
+    reference_type       operator *() &      { return this->get() ; }
+    reference_type_of_temporary_wrapper operator *() && { return base::types::move(this->get()) ; }
+#else
+    reference_const_type operator *() const { return this->get() ; }
+    reference_type       operator *()       { return this->get() ; }
+#endif // !defined BOOST_NO_CXX11_REF_QUALIFIERS
+
+#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) 
+    reference_const_type value() const&
+      { 
+        if (this->is_initialized())
+          return this->get() ;
+        else
+          throw_exception(bad_optional_access());
+      }
+      
+    reference_type value() &
+      { 
+        if (this->is_initialized())
+          return this->get() ;
+        else
+          throw_exception(bad_optional_access());
+      }
+      
+    reference_type_of_temporary_wrapper value() &&
+      { 
+        if (this->is_initialized())
+          return base::types::move(this->get()) ;
+        else
+          throw_exception(bad_optional_access());
+      }
+
+#else 
+    reference_const_type value() const
+      { 
+        if (this->is_initialized())
+          return this->get() ;
+        else
+          throw_exception(bad_optional_access());
+      }
+      
+    reference_type value()
+      { 
+        if (this->is_initialized())
+          return this->get() ;
+        else
+          throw_exception(bad_optional_access());
+      }
+#endif
+
+
+#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
+    template <class U>
+    value_type value_or ( U&& v ) const&
+      { 
+        if (this->is_initialized())
+          return get();
+        else
+          return boost::forward<U>(v);
+      }
+    
+    template <class U>
+    value_type value_or ( U&& v ) && 
+      { 
+        if (this->is_initialized())
+          return base::types::move(get());
+        else
+          return boost::forward<U>(v);
+      }
+#elif !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+    template <class U>
+    value_type value_or ( U&& v ) const 
+      {
+        if (this->is_initialized())
+          return get();
+        else
+          return boost::forward<U>(v);
+      }
+#else
+    template <class U>
+    value_type value_or ( U const& v ) const 
+      { 
+        if (this->is_initialized())
+          return get();
+        else
+          return v;
+      }
+      
+    template <class U>
+    value_type value_or ( U& v ) const 
+      { 
+        if (this->is_initialized())
+          return get();
+        else
+          return v;
+      }
+#endif
+
+
+#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
+    template <typename F>
+    value_type value_or_eval ( F f ) const&
+      {
+        if (this->is_initialized())
+          return get();
+        else
+          return f();
+      }
+      
+    template <typename F>
+    value_type value_or_eval ( F f ) &&
+      {
+        if (this->is_initialized())
+          return base::types::move(get());
+        else
+          return f();
+      }
+#else
+    template <typename F>
+    value_type value_or_eval ( F f ) const
+      {
+        if (this->is_initialized())
+          return get();
+        else
+          return f();
+      }
+#endif
+      
+    bool operator!() const BOOST_NOEXCEPT { return !this->is_initialized() ; }
+    
+    BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
+} ;
+
+} // namespace boost
+
+
+#endif // header guard
diff --git a/3rdparty/boost/boost/optional/detail/optional_aligned_storage.hpp b/3rdparty/boost/boost/optional/detail/optional_aligned_storage.hpp
new file mode 100644 (file)
index 0000000..6c7d581
--- /dev/null
@@ -0,0 +1,75 @@
+// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
+// Copyright (C) 2016 Andrzej Krzemienski.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  fernando_cacciola@hotmail.com
+//  akrzemi1@gmail.com
+
+#ifndef BOOST_OPTIONAL_OPTIONAL_DETAIL_OPTIONAL_ALIGNED_STORAGE_AJK_12FEB2016_HPP
+#define BOOST_OPTIONAL_OPTIONAL_DETAIL_OPTIONAL_ALIGNED_STORAGE_AJK_12FEB2016_HPP
+
+namespace boost {
+
+namespace optional_detail {
+// This local class is used instead of that in "aligned_storage.hpp"
+// because I've found the 'official' class to ICE BCB5.5
+// when some types are used with optional<>
+// (due to sizeof() passed down as a non-type template parameter)
+template <class T>
+class aligned_storage
+{
+    // Borland ICEs if unnamed unions are used for this!
+    union
+    // This works around GCC warnings about breaking strict aliasing rules when casting storage address to T*
+#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
+    __attribute__((__may_alias__))
+#endif
+    dummy_u
+    {
+        char data[ sizeof(T) ];
+        BOOST_DEDUCED_TYPENAME type_with_alignment<
+          ::boost::alignment_of<T>::value >::type aligner_;
+    } dummy_ ;
+
+  public:
+
+#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
+    void const* address() const { return &dummy_; }
+    void      * address()       { return &dummy_; }
+#else
+    void const* address() const { return dummy_.data; }
+    void      * address()       { return dummy_.data; }
+#endif
+
+#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
+       // This workaround is supposed to silence GCC warnings about broken strict aliasing rules
+       T const* ptr_ref() const
+       {
+               union { void const* ap_pvoid; T const* as_ptype; } caster = { address() };
+               return caster.as_ptype;
+       }
+       T *      ptr_ref()
+       {
+               union { void* ap_pvoid; T* as_ptype; } caster = { address() };
+               return caster.as_ptype;
+       }
+#else
+       T const* ptr_ref() const { return static_cast<T const*>(address()); }
+       T *      ptr_ref()       { return static_cast<T *>     (address()); }
+#endif
+
+       T const& ref() const { return *ptr_ref(); }
+       T &      ref()       { return *ptr_ref(); }
+  
+} ;
+
+} // namespace optional_detail
+} // namespace boost
+
+#endif // header guard
diff --git a/3rdparty/boost/boost/optional/detail/optional_config.hpp b/3rdparty/boost/boost/optional/detail/optional_config.hpp
new file mode 100644 (file)
index 0000000..648744e
--- /dev/null
@@ -0,0 +1,99 @@
+// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
+// Copyright (C) 2015 Andrzej Krzemienski.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  akrzemi1@gmail.com
+
+#ifndef BOOST_OPTIONAL_DETAIL_OPTIONAL_CONFIG_AJK_28JAN2015_HPP
+#define BOOST_OPTIONAL_DETAIL_OPTIONAL_CONFIG_AJK_28JAN2015_HPP
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#if (defined BOOST_NO_CXX11_RVALUE_REFERENCES) || (defined BOOST_OPTIONAL_CONFIG_NO_RVALUE_REFERENCES)
+# define BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+#endif
+
+#if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION,<=700)
+// AFAICT only Intel 7 correctly resolves the overload set
+// that includes the in-place factory taking functions,
+// so for the other icc versions, in-place factory support
+// is disabled
+# define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+#endif
+
+#if BOOST_WORKAROUND(__BORLANDC__, <= 0x551)
+// BCB (5.5.1) cannot parse the nested template struct in an inplace factory.
+# define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+#endif
+
+#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) \
+    && defined BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
+// BCB (up to 5.64) has the following bug:
+//   If there is a member function/operator template of the form
+//     template<class Expr> mfunc( Expr expr ) ;
+//   some calls are resolved to this even if there are other better matches.
+//   The effect of this bug is that calls to converting ctors and assignments
+//   are incorrectly sink to this general catch-all member function template as shown above.
+# define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
+#endif
+
+#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+// GCC since 3.3 has may_alias attribute that helps to alleviate optimizer issues with
+// regard to violation of the strict aliasing rules. The optional< T > storage type is marked
+// with this attribute in order to let the compiler know that it will alias objects of type T
+// and silence compilation warnings.
+# define BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS
+#endif
+
+#if (defined(_MSC_VER) && _MSC_VER <= 1800)
+// on MSCV 2013 and earlier an unwanted temporary is created when you assign from
+// a const lvalue of integral type. Thus we bind not to the original address but
+// to a temporary. 
+# define BOOST_OPTIONAL_CONFIG_NO_PROPER_ASSIGN_FROM_CONST_INT
+#endif
+
+#if (defined __GNUC__) && (!defined BOOST_INTEL_CXX_VERSION) && (!defined __clang__)
+// On some GCC versions an unwanted temporary is created when you copy-initialize
+// from a const lvalue of integral type. Thus we bind not to the original address but
+// to a temporary.
+
+# if (__GNUC__ < 4)
+#  define BOOST_OPTIONAL_CONFIG_NO_PROPER_CONVERT_FROM_CONST_INT
+# endif
+
+# if (__GNUC__ == 4 && __GNUC_MINOR__ <= 5)
+#  define BOOST_OPTIONAL_CONFIG_NO_PROPER_CONVERT_FROM_CONST_INT
+# endif
+
+# if (__GNUC__ == 5 && __GNUC_MINOR__ < 2)
+#  define BOOST_OPTIONAL_CONFIG_NO_PROPER_CONVERT_FROM_CONST_INT
+# endif
+
+# if (__GNUC__ == 5 && __GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ == 0)
+#  define BOOST_OPTIONAL_CONFIG_NO_PROPER_CONVERT_FROM_CONST_INT
+# endif
+
+#endif // defined(__GNUC__)
+
+#if (defined __GNUC__) && (!defined BOOST_NO_CXX11_RVALUE_REFERENCES)
+// On some initial rvalue reference implementations GCC does it in a strange way,
+// preferring perfect-forwarding constructor to implicit copy constructor.
+
+# if (__GNUC__ == 4 && __GNUC_MINOR__ == 4)
+#  define BOOST_OPTIONAL_CONFIG_NO_LEGAL_CONVERT_FROM_REF
+# endif
+
+# if (__GNUC__ == 4 && __GNUC_MINOR__ == 5)
+#  define BOOST_OPTIONAL_CONFIG_NO_LEGAL_CONVERT_FROM_REF
+# endif
+
+#endif // defined(__GNUC__)
+
+#endif // header guard
diff --git a/3rdparty/boost/boost/optional/detail/optional_factory_support.hpp b/3rdparty/boost/boost/optional/detail/optional_factory_support.hpp
new file mode 100644 (file)
index 0000000..efff92a
--- /dev/null
@@ -0,0 +1,36 @@
+// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
+// Copyright (C) 2016 Andrzej Krzemienski.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  fernando_cacciola@hotmail.com
+//  akrzemi1@gmail.com
+
+#ifndef BOOST_OPTIONAL_OPTIONAL_DETAIL_OPTIONAL_FACTORY_SUPPORT_AJK_12FEB2016_HPP
+#define BOOST_OPTIONAL_OPTIONAL_DETAIL_OPTIONAL_FACTORY_SUPPORT_AJK_12FEB2016_HPP
+
+// Daniel Wallin discovered that bind/apply.hpp badly interacts with the apply<>
+// member template of a factory as used in the optional<> implementation.
+// He proposed this simple fix which is to move the call to apply<> outside
+// namespace boost.
+namespace boost_optional_detail
+{
+  template <class T, class Factory>
+  inline void construct(Factory const& factory, void* address)
+  {
+    factory.BOOST_NESTED_TEMPLATE apply<T>(address);
+  }
+}
+
+namespace boost
+{
+  class in_place_factory_base ;
+  class typed_in_place_factory_base ;
+}
+
+#endif // header guard
diff --git a/3rdparty/boost/boost/optional/detail/optional_reference_spec.hpp b/3rdparty/boost/boost/optional/detail/optional_reference_spec.hpp
new file mode 100644 (file)
index 0000000..ba3951a
--- /dev/null
@@ -0,0 +1,203 @@
+// Copyright (C) 2015-2016 Andrzej Krzemienski.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  akrzemi1@gmail.com
+
+#ifndef BOOST_OPTIONAL_DETAIL_OPTIONAL_REFERENCE_SPEC_AJK_03OCT2015_HPP
+#define BOOST_OPTIONAL_DETAIL_OPTIONAL_REFERENCE_SPEC_AJK_03OCT2015_HPP
+
+#ifdef BOOST_OPTIONAL_CONFIG_NO_PROPER_ASSIGN_FROM_CONST_INT
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_const.hpp>
+#endif
+
+# if 1
+
+namespace boost {
+
+namespace detail {
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+template <class From>
+void prevent_binding_rvalue()
+{
+#ifndef BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES
+    BOOST_STATIC_ASSERT_MSG(boost::is_lvalue_reference<From>::value, 
+                            "binding rvalue references to optional lvalue references is disallowed");
+#endif    
+}
+
+template <class T>
+BOOST_DEDUCED_TYPENAME boost::remove_reference<T>::type& forward_reference(T&& r)
+{
+    BOOST_STATIC_ASSERT_MSG(boost::is_lvalue_reference<T>::value, 
+                            "binding rvalue references to optional lvalue references is disallowed");
+    return boost::forward<T>(r);
+}
+
+#endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+template <class From>
+void prevent_assignment_from_false_const_integral()
+{
+#ifndef BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES
+#ifdef BOOST_OPTIONAL_CONFIG_NO_PROPER_ASSIGN_FROM_CONST_INT
+    // MSVC compiler without rvalue refernces: we need to disable the asignment from
+    // const integral lvalue reference, as it may be an invalid temporary
+    BOOST_STATIC_ASSERT_MSG(!(boost::is_const<From>::value && boost::is_integral<From>::value), 
+                            "binding const lvalue references to integral types is disabled in this compiler");
+#endif
+#endif   
+}
+
+template <class T>
+struct is_optional_
+{
+  static const bool value = false;
+};
+
+template <class U>
+struct is_optional_< ::boost::optional<U> >
+{
+  static const bool value = true;
+};
+
+template <class T>
+struct is_no_optional
+{
+  static const bool value = !is_optional_<BOOST_DEDUCED_TYPENAME boost::decay<T>::type>::value;
+};
+
+} // namespace detail
+
+template <class T>
+class optional<T&> : public optional_detail::optional_tag
+{
+    T* ptr_;
+    
+public:
+    typedef T& value_type;
+    typedef T& reference_type;
+    typedef T& reference_const_type;
+    typedef T& rval_reference_type;
+    typedef T* pointer_type;
+    typedef T* pointer_const_type;
+    
+    optional() BOOST_NOEXCEPT : ptr_() {}
+    optional(none_t) BOOST_NOEXCEPT : ptr_() {}  
+
+    template <class U>
+        explicit optional(const optional<U&>& rhs) BOOST_NOEXCEPT : ptr_(rhs.ptr_) {}
+    optional(const optional& rhs) BOOST_NOEXCEPT : ptr_(rhs.ptr_) {}
+    
+
+    optional& operator=(const optional& rhs) BOOST_NOEXCEPT { ptr_ = rhs.ptr_; return *this; }
+    template <class U>
+        optional& operator=(const optional<U&>& rhs) BOOST_NOEXCEPT { ptr_ = rhs.ptr_; return *this; }
+    optional& operator=(none_t) BOOST_NOEXCEPT { ptr_ = 0; return *this; }
+    
+    
+    void swap(optional& rhs) BOOST_NOEXCEPT { std::swap(ptr_, rhs.ptr_); }
+    T& get() const { BOOST_ASSERT(ptr_); return   *ptr_; }
+
+    T* get_ptr() const BOOST_NOEXCEPT { return ptr_; }
+    T* operator->() const { BOOST_ASSERT(ptr_); return ptr_; }
+    T& operator*() const { BOOST_ASSERT(ptr_); return *ptr_; }
+    T& value() const { return ptr_ ? *ptr_ : (throw_exception(bad_optional_access()), *ptr_); }
+    
+    bool operator!() const BOOST_NOEXCEPT { return ptr_ == 0; }  
+    BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
+      
+    void reset() BOOST_NOEXCEPT { ptr_ = 0; }
+
+    bool is_initialized() const BOOST_NOEXCEPT { return ptr_ != 0; }
+    
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES   
+    template <class R>
+        optional(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) BOOST_NOEXCEPT
+        : ptr_(boost::addressof(r)) { detail::prevent_binding_rvalue<R>(); }
+        
+    template <class R>
+        optional(bool cond, R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) BOOST_NOEXCEPT
+        : ptr_(cond ? boost::addressof(r) : 0) { detail::prevent_binding_rvalue<R>(); }
+        
+    template <class R>
+        BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R>, optional<T&>&>::type
+        operator=(R&& r) BOOST_NOEXCEPT { detail::prevent_binding_rvalue<R>(); ptr_ = boost::addressof(r); return *this; }
+        
+    template <class R>
+        void emplace(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) BOOST_NOEXCEPT
+        { detail::prevent_binding_rvalue<R>(); ptr_ = boost::addressof(r); }
+        
+    template <class R>
+      T& get_value_or(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) const BOOST_NOEXCEPT
+      { detail::prevent_binding_rvalue<R>(); return ptr_ ? *ptr_ : r; }
+      
+    template <class R>
+        T& value_or(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) const BOOST_NOEXCEPT
+        { detail::prevent_binding_rvalue<R>(); return ptr_ ? *ptr_ : r; }
+        
+    template <class R>
+      void reset(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) BOOST_NOEXCEPT
+      { detail::prevent_binding_rvalue<R>(); ptr_ = boost::addressof(r); }
+      
+    template <class F>
+        T& value_or_eval(F f) const { return ptr_ ? *ptr_ : detail::forward_reference(f()); }
+      
+#else  // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+    template <class U>
+        optional(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) BOOST_NOEXCEPT : ptr_(boost::addressof(v)) { }
+        
+    template <class U>
+        optional(bool cond, U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) BOOST_NOEXCEPT : ptr_(cond ? boost::addressof(v) : 0) {}
+
+    template <class U>
+        BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U>, optional<T&>&>::type
+        operator=(U& v) BOOST_NOEXCEPT
+        {
+            detail::prevent_assignment_from_false_const_integral<U>();
+            ptr_ = boost::addressof(v); return *this;
+        }
+
+    template <class U>
+        void emplace(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) BOOST_NOEXCEPT
+        { ptr_ = boost::addressof(v); }
+        
+    template <class U>
+      T& get_value_or(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) const BOOST_NOEXCEPT
+      { return ptr_ ? *ptr_ : v; }
+      
+    template <class U>
+        T& value_or(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) const BOOST_NOEXCEPT
+        { return ptr_ ? *ptr_ : v; }
+        
+    template <class U>
+      void reset(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) BOOST_NOEXCEPT
+      { ptr_ = boost::addressof(v); }
+      
+    template <class F>
+      T& value_or_eval(F f) const { return ptr_ ? *ptr_ : f(); }
+      
+#endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+};
+
+template <class T> 
+  void swap ( optional<T&>& x, optional<T&>& y) BOOST_NOEXCEPT
+{
+  x.swap(y);
+}
+
+} // namespace boost
+
+#endif // 1/0
+
+#endif // header guard
diff --git a/3rdparty/boost/boost/optional/detail/optional_relops.hpp b/3rdparty/boost/boost/optional/detail/optional_relops.hpp
new file mode 100644 (file)
index 0000000..3f96117
--- /dev/null
@@ -0,0 +1,196 @@
+// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
+// Copyright (C) 2015 Andrzej Krzemienski.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  akrzemi1@gmail.com
+
+#ifndef BOOST_OPTIONAL_DETAIL_OPTIONAL_RELOPS_AJK_03OCT2015_HPP
+#define BOOST_OPTIONAL_DETAIL_OPTIONAL_RELOPS_AJK_03OCT2015_HPP
+
+namespace boost {
+
+// optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values).
+// WARNING: This is UNLIKE pointers. Use equal_pointees()/less_pointess() in generic code instead.
+
+
+//
+// optional<T> vs optional<T> cases
+//
+
+template<class T>
+inline
+bool operator == ( optional<T> const& x, optional<T> const& y )
+{ return equal_pointees(x,y); }
+
+template<class T>
+inline
+bool operator < ( optional<T> const& x, optional<T> const& y )
+{ return less_pointees(x,y); }
+
+template<class T>
+inline
+bool operator != ( optional<T> const& x, optional<T> const& y )
+{ return !( x == y ) ; }
+
+template<class T>
+inline
+bool operator > ( optional<T> const& x, optional<T> const& y )
+{ return y < x ; }
+
+template<class T>
+inline
+bool operator <= ( optional<T> const& x, optional<T> const& y )
+{ return !( y < x ) ; }
+
+template<class T>
+inline
+bool operator >= ( optional<T> const& x, optional<T> const& y )
+{ return !( x < y ) ; }
+
+
+//
+// optional<T> vs T cases
+//
+template<class T>
+inline
+bool operator == ( optional<T> const& x, T const& y )
+{ return equal_pointees(x, optional<T>(y)); }
+
+template<class T>
+inline
+bool operator < ( optional<T> const& x, T const& y )
+{ return less_pointees(x, optional<T>(y)); }
+
+template<class T>
+inline
+bool operator != ( optional<T> const& x, T const& y )
+{ return !( x == y ) ; }
+
+template<class T>
+inline
+bool operator > ( optional<T> const& x, T const& y )
+{ return y < x ; }
+
+template<class T>
+inline
+bool operator <= ( optional<T> const& x, T const& y )
+{ return !( y < x ) ; }
+
+template<class T>
+inline
+bool operator >= ( optional<T> const& x, T const& y )
+{ return !( x < y ) ; }
+
+//
+// T vs optional<T> cases
+//
+
+template<class T>
+inline
+bool operator == ( T const& x, optional<T> const& y )
+{ return equal_pointees( optional<T>(x), y ); }
+
+template<class T>
+inline
+bool operator < ( T const& x, optional<T> const& y )
+{ return less_pointees( optional<T>(x), y ); }
+
+template<class T>
+inline
+bool operator != ( T const& x, optional<T> const& y )
+{ return !( x == y ) ; }
+
+template<class T>
+inline
+bool operator > ( T const& x, optional<T> const& y )
+{ return y < x ; }
+
+template<class T>
+inline
+bool operator <= ( T const& x, optional<T> const& y )
+{ return !( y < x ) ; }
+
+template<class T>
+inline
+bool operator >= ( T const& x, optional<T> const& y )
+{ return !( x < y ) ; }
+
+
+//
+// optional<T> vs none cases
+//
+
+template<class T>
+inline
+bool operator == ( optional<T> const& x, none_t ) BOOST_NOEXCEPT
+{ return !x; }
+
+template<class T>
+inline
+bool operator < ( optional<T> const& x, none_t )
+{ return less_pointees(x,optional<T>() ); }
+
+template<class T>
+inline
+bool operator != ( optional<T> const& x, none_t ) BOOST_NOEXCEPT
+{ return bool(x); }
+
+template<class T>
+inline
+bool operator > ( optional<T> const& x, none_t y )
+{ return y < x ; }
+
+template<class T>
+inline
+bool operator <= ( optional<T> const& x, none_t y )
+{ return !( y < x ) ; }
+
+template<class T>
+inline
+bool operator >= ( optional<T> const& x, none_t y )
+{ return !( x < y ) ; }
+
+//
+// none vs optional<T> cases
+//
+
+template<class T>
+inline
+bool operator == ( none_t , optional<T> const& y ) BOOST_NOEXCEPT
+{ return !y; }
+
+template<class T>
+inline
+bool operator < ( none_t , optional<T> const& y )
+{ return less_pointees(optional<T>() ,y); }
+
+template<class T>
+inline
+bool operator != ( none_t, optional<T> const& y ) BOOST_NOEXCEPT
+{ return bool(y); }
+
+template<class T>
+inline
+bool operator > ( none_t x, optional<T> const& y )
+{ return y < x ; }
+
+template<class T>
+inline
+bool operator <= ( none_t x, optional<T> const& y )
+{ return !( y < x ) ; }
+
+template<class T>
+inline
+bool operator >= ( none_t x, optional<T> const& y )
+{ return !( x < y ) ; }
+
+} // namespace boost
+
+#endif // header guard
+
diff --git a/3rdparty/boost/boost/optional/detail/optional_swap.hpp b/3rdparty/boost/boost/optional/detail/optional_swap.hpp
new file mode 100644 (file)
index 0000000..2a7059e
--- /dev/null
@@ -0,0 +1,117 @@
+// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
+// Copyright (C) 2015 Andrzej Krzemienski.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  akrzemi1@gmail.com
+
+#ifndef BOOST_OPTIONAL_DETAIL_OPTIONAL_SWAP_AJK_28JAN2015_HPP
+#define BOOST_OPTIONAL_DETAIL_OPTIONAL_SWAP_AJK_28JAN2015_HPP
+
+#include <boost/core/swap.hpp>
+#include <boost/optional/optional_fwd.hpp>
+
+namespace boost {
+
+namespace optional_detail {
+
+template <bool use_default_constructor> struct swap_selector;
+
+template <>
+struct swap_selector<true>
+{
+    template <class T>
+    static void optional_swap ( optional<T>& x, optional<T>& y )
+    {
+        const bool hasX = !!x;
+        const bool hasY = !!y;
+
+        if ( !hasX && !hasY )
+            return;
+
+        if( !hasX )
+            x.emplace();
+        else if ( !hasY )
+            y.emplace();
+
+        // Boost.Utility.Swap will take care of ADL and workarounds for broken compilers
+        boost::swap(x.get(), y.get());
+
+        if( !hasX )
+            y = boost::none ;
+        else if( !hasY )
+            x = boost::none ;
+    }
+};
+
+#ifdef BOOST_OPTIONAL_DETAIL_MOVE
+# undef BOOST_OPTIONAL_DETAIL_MOVE
+#endif
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+# define BOOST_OPTIONAL_DETAIL_MOVE(EXPR_) boost::move(EXPR_)
+#else
+# define BOOST_OPTIONAL_DETAIL_MOVE(EXPR_) EXPR_
+#endif
+
+template <>
+struct swap_selector<false>
+{
+    template <class T>
+    static void optional_swap ( optional<T>& x, optional<T>& y ) 
+    //BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && BOOST_NOEXCEPT_EXPR(boost::swap(*x, *y)))
+    {
+        if (x)
+        {
+            if (y)
+            {
+                boost::swap(*x, *y);
+            }
+            else
+            {
+                y = BOOST_OPTIONAL_DETAIL_MOVE(*x);
+                x = boost::none;
+            }
+        }
+        else
+        {
+            if (y)
+            {
+                x = BOOST_OPTIONAL_DETAIL_MOVE(*y);
+                y = boost::none;
+            }
+        }
+    }
+};
+
+} // namespace optional_detail
+
+#if (!defined BOOST_NO_CXX11_RVALUE_REFERENCES) && (!defined BOOST_CONFIG_RESTORE_OBSOLETE_SWAP_IMPLEMENTATION)
+
+template<class T>
+struct optional_swap_should_use_default_constructor : boost::false_type {} ;
+
+#else
+
+template<class T>
+struct optional_swap_should_use_default_constructor : has_nothrow_default_constructor<T> {} ;
+
+#endif
+
+template <class T>
+inline void swap ( optional<T>& x, optional<T>& y )
+//BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && BOOST_NOEXCEPT_EXPR(boost::swap(*x, *y)))
+{
+    optional_detail::swap_selector<optional_swap_should_use_default_constructor<T>::value>::optional_swap(x, y);
+}
+
+} // namespace boost
+
+#undef BOOST_OPTIONAL_DETAIL_MOVE
+
+#endif // header guard
index 9def94ede84805ffbc7b2243df7a47f052807341..ff1a16ca487bf5ec263f96bbfa3987ae3126f6fa 100644 (file)
@@ -20,7 +20,6 @@
 #include <new>
 #include <iosfwd>
 
-#include <boost/config.hpp>
 #include <boost/assert.hpp>
 #include <boost/core/addressof.hpp>
 #include <boost/core/enable_if.hpp>
 #include <boost/throw_exception.hpp>
 #include <boost/type.hpp>
 #include <boost/type_traits/alignment_of.hpp>
+#include <boost/type_traits/conditional.hpp>
 #include <boost/type_traits/has_nothrow_constructor.hpp>
 #include <boost/type_traits/type_with_alignment.hpp>
 #include <boost/type_traits/remove_const.hpp>
 #include <boost/type_traits/remove_reference.hpp>
 #include <boost/type_traits/decay.hpp>
 #include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/is_constructible.hpp>
 #include <boost/type_traits/is_lvalue_reference.hpp>
 #include <boost/type_traits/is_nothrow_move_assignable.hpp>
 #include <boost/type_traits/is_nothrow_move_constructible.hpp>
-#include <boost/type_traits/is_reference.hpp>
 #include <boost/type_traits/is_rvalue_reference.hpp>
 #include <boost/type_traits/is_same.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/detail/reference_content.hpp>
 #include <boost/move/utility.hpp>
 #include <boost/none.hpp>
 #include <boost/utility/compare_pointees.hpp>
 
 #include <boost/optional/optional_fwd.hpp>
+#include <boost/optional/detail/optional_config.hpp>
+#include <boost/optional/detail/optional_factory_support.hpp>
+#include <boost/optional/detail/optional_aligned_storage.hpp>
 
-#if (defined BOOST_NO_CXX11_RVALUE_REFERENCES) || (defined BOOST_OPTIONAL_CONFIG_NO_RVALUE_REFERENCES)
-#define BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-#endif
-
-#if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION,<=700)
-// AFAICT only Intel 7 correctly resolves the overload set
-// that includes the in-place factory taking functions,
-// so for the other icc versions, in-place factory support
-// is disabled
-#define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
-#endif
-
-#if BOOST_WORKAROUND(__BORLANDC__, <= 0x551)
-// BCB (5.5.1) cannot parse the nested template struct in an inplace factory.
-#define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
-#endif
-
-#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) \
-    && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581) )
-// BCB (up to 5.64) has the following bug:
-//   If there is a member function/operator template of the form
-//     template<class Expr> mfunc( Expr expr ) ;
-//   some calls are resolved to this even if there are other better matches.
-//   The effect of this bug is that calls to converting ctors and assignments
-//   are incrorrectly sink to this general catch-all member function template as shown above.
-#define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
-#endif
-
-#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
-// GCC since 3.3 has may_alias attribute that helps to alleviate optimizer issues with
-// regard to violation of the strict aliasing rules. The optional< T > storage type is marked
-// with this attribute in order to let the compiler know that it will alias objects of type T
-// and silence compilation warnings.
-#define BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS
-#endif
-
-// Daniel Wallin discovered that bind/apply.hpp badly interacts with the apply<>
-// member template of a factory as used in the optional<> implementation.
-// He proposed this simple fix which is to move the call to apply<> outside
-// namespace boost.
-namespace boost_optional_detail
-{
-  template <class T, class Factory>
-  inline void construct(Factory const& factory, void* address)
-  {
-    factory.BOOST_NESTED_TEMPLATE apply<T>(address);
-  }
-}
-
-
+#ifdef BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
+#include <boost/optional/detail/old_optional_implementation.hpp>
+#else
 namespace boost {
 
-class in_place_factory_base ;
-class typed_in_place_factory_base ;
-
-// This forward is needed to refer to namespace scope swap from the member swap
-template<class T> void swap ( optional<T>& x, optional<T>& y );
-
 namespace optional_detail {
-// This local class is used instead of that in "aligned_storage.hpp"
-// because I've found the 'official' class to ICE BCB5.5
-// when some types are used with optional<>
-// (due to sizeof() passed down as a non-type template parameter)
-template <class T>
-class aligned_storage
-{
-    // Borland ICEs if unnamed unions are used for this!
-    union
-    // This works around GCC warnings about breaking strict aliasing rules when casting storage address to T*
-#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
-    __attribute__((__may_alias__))
-#endif
-    dummy_u
-    {
-        char data[ sizeof(T) ];
-        BOOST_DEDUCED_TYPENAME type_with_alignment<
-          ::boost::alignment_of<T>::value >::type aligner_;
-    } dummy_ ;
-
-  public:
-
-#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
-    void const* address() const { return &dummy_; }
-    void      * address()       { return &dummy_; }
-#else
-    void const* address() const { return dummy_.data; }
-    void      * address()       { return dummy_.data; }
-#endif
-} ;
-
-template<class T>
-struct types_when_isnt_ref
-{
-  typedef T const& reference_const_type ;
-  typedef T &      reference_type ;
-#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-  typedef T &&     rval_reference_type ;
-  typedef T &&     reference_type_of_temporary_wrapper;
-#ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
-  // GCC 4.4 has support for an early draft of rvalue references. The conforming version below
-  // causes warnings about returning references to a temporary.
-  static T&& move(T&& r) { return r; }
-#else
-  static rval_reference_type move(reference_type r) { return boost::move(r); }
-#endif
-#endif
-  typedef T const* pointer_const_type ;
-  typedef T *      pointer_type ;
-  typedef T const& argument_type ;
-} ;
-
-template<class T>
-struct types_when_is_ref
-{
-  typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type raw_type ;
-
-  typedef raw_type&  reference_const_type ;
-  typedef raw_type&  reference_type ;
-#ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-  typedef BOOST_DEDUCED_TYPENAME remove_const<raw_type>::type&& rval_reference_type ;
-  typedef raw_type&  reference_type_of_temporary_wrapper;
-  static reference_type move(reference_type r) { return r; }
-#endif
-  typedef raw_type*  pointer_const_type ;
-  typedef raw_type*  pointer_type ;
-  typedef raw_type&  argument_type ;
-} ;
-
-template <class To, class From>
-void prevent_binding_rvalue_ref_to_optional_lvalue_ref()
-{
-#ifndef BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES
-  BOOST_STATIC_ASSERT_MSG(
-    !boost::is_lvalue_reference<To>::value || !boost::is_rvalue_reference<From>::value, 
-    "binding rvalue references to optional lvalue references is disallowed");
-#endif    
-}
 
 struct optional_tag {} ;
 
+
 template<class T>
 class optional_base : public optional_tag
 {
   private :
 
-    typedef
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-    BOOST_DEDUCED_TYPENAME
-#endif
-    ::boost::detail::make_reference_content<T>::type internal_type ;
-
-    typedef aligned_storage<internal_type> storage_type ;
-
-    typedef types_when_isnt_ref<T> types_when_not_ref ;
-    typedef types_when_is_ref<T>   types_when_ref   ;
-
+    typedef aligned_storage<T> storage_type ;
     typedef optional_base<T> this_type ;
 
   protected :
 
     typedef T value_type ;
 
-    typedef mpl::true_  is_reference_tag ;
-    typedef mpl::false_ is_not_reference_tag ;
-
-    typedef BOOST_DEDUCED_TYPENAME is_reference<T>::type is_reference_predicate ;
-
-  public:
-    typedef BOOST_DEDUCED_TYPENAME mpl::if_<is_reference_predicate,types_when_ref,types_when_not_ref>::type types ;
-
   protected:
-    typedef BOOST_DEDUCED_TYPENAME types::reference_type       reference_type ;
-    typedef BOOST_DEDUCED_TYPENAME types::reference_const_type reference_const_type ;
+    typedef T &       reference_type ;
+    typedef T const&  reference_const_type ;
 #ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-    typedef BOOST_DEDUCED_TYPENAME types::rval_reference_type  rval_reference_type ;
-    typedef BOOST_DEDUCED_TYPENAME types::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper ;
+    typedef T &&  rval_reference_type ;
+    typedef T &&  reference_type_of_temporary_wrapper ;
 #endif
-    typedef BOOST_DEDUCED_TYPENAME types::pointer_type         pointer_type ;
-    typedef BOOST_DEDUCED_TYPENAME types::pointer_const_type   pointer_const_type ;
-    typedef BOOST_DEDUCED_TYPENAME types::argument_type        argument_type ;
+    typedef T *         pointer_type ;
+    typedef T const*    pointer_const_type ;
+    typedef T const&    argument_type ;
 
     // Creates an optional<T> uninitialized.
     // No-throw
@@ -252,7 +103,7 @@ class optional_base : public optional_tag
       :
       m_initialized(false)
     {
-      construct(val);
+        construct(val);
     }
 
 #ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
@@ -332,7 +183,7 @@ class optional_base : public optional_tag
       if (is_initialized())
       {
         if ( rhs.is_initialized() )
-             assign_value(rhs.get_impl(), is_reference_predicate() );
+             assign_value(rhs.get_impl());
         else destroy();
       }
       else
@@ -349,7 +200,7 @@ class optional_base : public optional_tag
       if (is_initialized())
       {
         if ( rhs.is_initialized() )
-             assign_value(boost::move(rhs.get_impl()), is_reference_predicate() );
+             assign_value( boost::move(rhs.get_impl()) );
         else destroy();
       }
       else
@@ -368,9 +219,9 @@ class optional_base : public optional_tag
       {
         if ( rhs.is_initialized() )
 #ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
-          assign_value(rhs.get(), is_reference_predicate() );
+          assign_value( rhs.get() );
 #else
-          assign_value(static_cast<value_type>(rhs.get()), is_reference_predicate() );
+          assign_value( static_cast<value_type>(rhs.get()) );
 #endif
           
         else destroy();
@@ -395,7 +246,7 @@ class optional_base : public optional_tag
       if (is_initialized())
       {
         if ( rhs.is_initialized() )
-             assign_value(static_cast<ref_type>(rhs.get()), is_reference_predicate() );
+             assign_value( static_cast<ref_type>(rhs.get()) );
         else destroy();
       }
       else
@@ -410,7 +261,7 @@ class optional_base : public optional_tag
     void assign ( argument_type val )
     {
       if (is_initialized())
-           assign_value(val, is_reference_predicate() );
+           assign_value(val);
       else construct(val);
     }
     
@@ -419,7 +270,7 @@ class optional_base : public optional_tag
     void assign ( rval_reference_type val )
     {
       if (is_initialized())
-           assign_value( boost::move(val), is_reference_predicate() );
+           assign_value( boost::move(val) );
       else construct( boost::move(val) );
     }
 #endif
@@ -471,14 +322,14 @@ class optional_base : public optional_tag
 
     void construct ( argument_type val )
      {
-       ::new (m_storage.address()) internal_type(val) ;
+       ::new (m_storage.address()) value_type(val) ;
        m_initialized = true ;
      }
      
 #ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
     void construct ( rval_reference_type val )
      {
-       ::new (m_storage.address()) internal_type( types::move(val) ) ;
+       ::new (m_storage.address()) value_type( boost::move(val) ) ;
        m_initialized = true ;
      }
 #endif
@@ -491,7 +342,7 @@ class optional_base : public optional_tag
     void emplace_assign ( Args&&... args )
      {
        destroy();
-       ::new (m_storage.address()) internal_type( boost::forward<Args>(args)... );
+       ::new (m_storage.address()) value_type( boost::forward<Args>(args)... );
        m_initialized = true ;
      }
 #elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
@@ -499,14 +350,14 @@ class optional_base : public optional_tag
     void emplace_assign ( Arg&& arg )
      {
        destroy();
-       ::new (m_storage.address()) internal_type( boost::forward<Arg>(arg) );
+       ::new (m_storage.address()) value_type( boost::forward<Arg>(arg) );
        m_initialized = true ;
      }
      
     void emplace_assign ()
      {
        destroy();
-       ::new (m_storage.address()) internal_type();
+       ::new (m_storage.address()) value_type();
        m_initialized = true ;
      }
 #else
@@ -514,7 +365,7 @@ class optional_base : public optional_tag
     void emplace_assign ( const Arg& arg )
      {
        destroy();
-       ::new (m_storage.address()) internal_type( arg );
+       ::new (m_storage.address()) value_type( arg );
        m_initialized = true ;
      }
      
@@ -522,14 +373,14 @@ class optional_base : public optional_tag
     void emplace_assign ( Arg& arg )
      {
        destroy();
-       ::new (m_storage.address()) internal_type( arg );
+       ::new (m_storage.address()) value_type( arg );
        m_initialized = true ;
      }
      
     void emplace_assign ()
      {
        destroy();
-       ::new (m_storage.address()) internal_type();
+       ::new (m_storage.address()) value_type();
        m_initialized = true ;
      }
 #endif
@@ -541,7 +392,6 @@ class optional_base : public optional_tag
     template<class Expr>
     void construct ( Expr&& factory, in_place_factory_base const* )
      {
-       BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
        boost_optional_detail::construct<value_type>(factory, m_storage.address());
        m_initialized = true ;
      }
@@ -550,7 +400,6 @@ class optional_base : public optional_tag
     template<class Expr>
     void construct ( Expr&& factory, typed_in_place_factory_base const* )
      {
-       BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
        factory.apply(m_storage.address()) ;
        m_initialized = true ;
      }
@@ -575,7 +424,6 @@ class optional_base : public optional_tag
     template<class Expr>
     void construct ( Expr const& factory, in_place_factory_base const* )
      {
-       BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
        boost_optional_detail::construct<value_type>(factory, m_storage.address());
        m_initialized = true ;
      }
@@ -584,7 +432,6 @@ class optional_base : public optional_tag
     template<class Expr>
     void construct ( Expr const& factory, typed_in_place_factory_base const* )
      {
-       BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
        factory.apply(m_storage.address()) ;
        m_initialized = true ;
      }
@@ -615,7 +462,7 @@ class optional_base : public optional_tag
     template<class Expr>
     void construct ( Expr&& expr, void const* )
     {
-      new (m_storage.address()) internal_type(boost::forward<Expr>(expr)) ;
+      new (m_storage.address()) value_type(boost::forward<Expr>(expr)) ;
       m_initialized = true ;
     }
 
@@ -626,7 +473,7 @@ class optional_base : public optional_tag
     template<class Expr>
     void assign_expr_to_initialized ( Expr&& expr, void const* )
     {
-      assign_value(boost::forward<Expr>(expr), is_reference_predicate());
+      assign_value( boost::forward<Expr>(expr) );
     }
 #else
     // Constructs using any expression implicitly convertible to the single argument
@@ -636,7 +483,7 @@ class optional_base : public optional_tag
     template<class Expr>
     void construct ( Expr const& expr, void const* )
      {
-       new (m_storage.address()) internal_type(expr) ;
+       new (m_storage.address()) value_type(expr) ;
        m_initialized = true ;
      }
 
@@ -647,7 +494,7 @@ class optional_base : public optional_tag
     template<class Expr>
     void assign_expr_to_initialized ( Expr const& expr, void const* )
      {
-       assign_value(expr, is_reference_predicate());
+       assign_value(expr);
      }
 
 #endif
@@ -674,7 +521,7 @@ class optional_base : public optional_tag
        {
          // An exception can be thrown here.
          // It it happens, THIS will be left uninitialized.
-         new (m_storage.address()) internal_type(types::move(expr.get())) ;
+         new (m_storage.address()) value_type(boost::move(expr.get())) ;
          m_initialized = true ;
        }
      }
@@ -687,78 +534,78 @@ class optional_base : public optional_tag
        {
          // An exception can be thrown here.
          // It it happens, THIS will be left uninitialized.
-         new (m_storage.address()) internal_type(expr.get()) ;
+         new (m_storage.address()) value_type(expr.get()) ;
          m_initialized = true ;
        }
      }
 #endif
 #endif // defined BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
 
-    void assign_value ( argument_type val, is_not_reference_tag ) { get_impl() = val; }
-    void assign_value ( argument_type val, is_reference_tag     ) { construct(val); }
+    void assign_value ( argument_type val ) { get_impl() = val; }
 #ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-    void assign_value ( rval_reference_type val, is_not_reference_tag ) { get_impl() = static_cast<rval_reference_type>(val); }
-    void assign_value ( rval_reference_type val, is_reference_tag     ) { construct( static_cast<rval_reference_type>(val) ); }
+    void assign_value ( rval_reference_type val ) { get_impl() = static_cast<rval_reference_type>(val); }
 #endif
 
     void destroy()
     {
       if ( m_initialized )
-        destroy_impl(is_reference_predicate()) ;
+        destroy_impl() ;
     }
 
-    reference_const_type get_impl() const { return dereference(get_object(), is_reference_predicate() ) ; }
-    reference_type       get_impl()       { return dereference(get_object(), is_reference_predicate() ) ; }
+    reference_const_type get_impl() const { return m_storage.ref() ; }
+    reference_type       get_impl()       { return m_storage.ref() ; }
 
-    pointer_const_type get_ptr_impl() const { return cast_ptr(get_object(), is_reference_predicate() ) ; }
-    pointer_type       get_ptr_impl()       { return cast_ptr(get_object(), is_reference_predicate() ) ; }
+    pointer_const_type get_ptr_impl() const { return m_storage.ptr_ref(); }
+    pointer_type       get_ptr_impl()       { return m_storage.ptr_ref(); }
 
   private :
 
-    // internal_type can be either T or reference_content<T>
-#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
-    // This workaround is supposed to silence GCC warnings about broken strict aliasing rules
-    internal_type const* get_object() const
-    {
-        union { void const* ap_pvoid; internal_type const* as_ptype; } caster = { m_storage.address() };
-        return caster.as_ptype;
-    }
-    internal_type *      get_object()
-    {
-        union { void* ap_pvoid; internal_type* as_ptype; } caster = { m_storage.address() };
-        return caster.as_ptype;
-    }
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
+    void destroy_impl ( ) { m_storage.ptr_ref()->~T() ; m_initialized = false ; }
 #else
-    internal_type const* get_object() const { return static_cast<internal_type const*>(m_storage.address()); }
-    internal_type *      get_object()       { return static_cast<internal_type *>     (m_storage.address()); }
+    void destroy_impl ( ) { m_storage.ref().T::~T() ; m_initialized = false ; }
 #endif
 
-    // reference_content<T> lacks an implicit conversion to T&, so the following is needed to obtain a proper reference.
-    reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; }
-    reference_type       dereference( internal_type*       p, is_not_reference_tag )       { return *p ; }
-    reference_const_type dereference( internal_type const* p, is_reference_tag     ) const { return p->get() ; }
-    reference_type       dereference( internal_type*       p, is_reference_tag     )       { return p->get() ; }
+    bool m_initialized ;
+    storage_type m_storage ;
+} ;
+
+// definition of metafunciton is_optional_val_init_candidate
+template <typename U>
+struct is_optional_related
+  : boost::conditional< boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
+                     || boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<U>::type, none_t>::value,
+    boost::true_type, boost::false_type>::type
+{};
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) && !defined(__SUNPRO_CC)
+  // this condition is a copy paste from is_constructible.hpp
+  // I also disable SUNPRO, as it seems not to support type_traits correctly
+  
+template <typename T, typename U>
+struct is_convertible_to_T_or_factory
+  : boost::conditional< boost::is_base_of<boost::in_place_factory_base, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
+                     || boost::is_base_of<boost::typed_in_place_factory_base, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
+                     || boost::is_constructible<T, U&&>::value
+                      , boost::true_type, boost::false_type>::type
+{};
 
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
-    void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->internal_type::~internal_type() ; m_initialized = false ; }
 #else
-    void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->~T() ; m_initialized = false ; }
-#endif
 
-    void destroy_impl ( is_reference_tag     ) { m_initialized = false ; }
+#define BOOST_OPTIONAL_DETAIL_NO_IS_CONSTRUCTIBLE_TRAIT
 
-    // If T is of reference type, trying to get a pointer to the held value must result in a compile-time error.
-    // Decent compilers should disallow conversions from reference_content<T>* to T*, but just in case,
-    // the following olverloads are used to filter out the case and guarantee an error in case of T being a reference.
-    pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; }
-    pointer_type       cast_ptr( internal_type *      p, is_not_reference_tag )       { return p ; }
-    pointer_const_type cast_ptr( internal_type const* p, is_reference_tag     ) const { return &p->get() ; }
-    pointer_type       cast_ptr( internal_type *      p, is_reference_tag     )       { return &p->get() ; }
+template <typename, typename>
+struct is_convertible_to_T_or_factory : boost::true_type
+{};
 
-    bool m_initialized ;
-    storage_type m_storage ;
-} ;
+#endif // is_convertible condition
 
+template <typename T, typename U>
+struct is_optional_val_init_candidate
+  : boost::conditional< !is_optional_related<U>::value && is_convertible_to_T_or_factory<T, U>::value
+                      , boost::true_type, boost::false_type>::type
+{};
+    
 } // namespace optional_detail
 
 template<class T>
@@ -797,7 +644,7 @@ class optional : public optional_detail::optional_base<T>
     // Creates an optional<T> initialized with 'move(val)'.
     // Can throw if T::T(T &&) does
     optional ( rval_reference_type val ) : base( boost::forward<T>(val) ) 
-      {optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, rval_reference_type>();}
+      {}
 #endif
 
     // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional.
@@ -847,12 +694,10 @@ class optional : public optional_detail::optional_base<T>
 
   template<class Expr>
   explicit optional ( Expr&& expr, 
-                      BOOST_DEDUCED_TYPENAME boost::disable_if_c<
-                        (boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type>::value) || 
-                        boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type, none_t>::value >::type* = 0 
+                      BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_val_init_candidate<T, Expr> >::type* = 0 
   ) 
     : base(boost::forward<Expr>(expr),boost::addressof(expr)) 
-    {optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, Expr&&>();}
+    {}
 
 #else
     template<class Expr>
@@ -873,23 +718,22 @@ class optional : public optional_detail::optional_base<T>
        {}
 
 #endif
-   // No-throw (assuming T::~T() doesn't)
+
+#if BOOST_WORKAROUND(_MSC_VER, <= 1600)
+    //  On old MSVC compilers the implicitly declared dtor is not called
     ~optional() {}
+#endif
 
+       
 #if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
     // Assigns from an expression. See corresponding constructor.
     // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED
 #ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
 
     template<class Expr>
-    BOOST_DEDUCED_TYPENAME boost::disable_if_c<
-      boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type>::value || 
-        boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type, none_t>::value,
-      optional&
-    >::type 
+    BOOST_DEDUCED_TYPENAME boost::enable_if<optional_detail::is_optional_val_init_candidate<T, Expr>, optional&>::type 
     operator= ( Expr&& expr )
       {
-        optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, Expr&&>();
         this->assign_expr(boost::forward<Expr>(expr),boost::addressof(expr));
         return *this ;
       }
@@ -957,7 +801,6 @@ class optional : public optional_detail::optional_base<T>
     // Assigns from a T (deep-moves the rhs value)
     optional& operator= ( rval_reference_type val )
       {
-        optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, rval_reference_type>();
         this->assign( boost::move(val) ) ;
         return *this ;
       }
@@ -1040,7 +883,7 @@ class optional : public optional_detail::optional_base<T>
 #if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) 
     reference_const_type operator *() const& { return this->get() ; }
     reference_type       operator *() &      { return this->get() ; }
-    reference_type_of_temporary_wrapper operator *() && { return base::types::move(this->get()) ; }
+    reference_type_of_temporary_wrapper operator *() && { return boost::move(this->get()) ; }
 #else
     reference_const_type operator *() const { return this->get() ; }
     reference_type       operator *()       { return this->get() ; }
@@ -1066,7 +909,7 @@ class optional : public optional_detail::optional_base<T>
     reference_type_of_temporary_wrapper value() &&
       { 
         if (this->is_initialized())
-          return base::types::move(this->get()) ;
+          return boost::move(this->get()) ;
         else
           throw_exception(bad_optional_access());
       }
@@ -1104,7 +947,7 @@ class optional : public optional_detail::optional_base<T>
     value_type value_or ( U&& v ) && 
       { 
         if (this->is_initialized())
-          return base::types::move(get());
+          return boost::move(get());
         else
           return boost::forward<U>(v);
       }
@@ -1152,7 +995,7 @@ class optional : public optional_detail::optional_base<T>
     value_type value_or_eval ( F f ) &&
       {
         if (this->is_initialized())
-          return base::types::move(get());
+          return boost::move(get());
         else
           return f();
       }
@@ -1172,6 +1015,12 @@ class optional : public optional_detail::optional_base<T>
     BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
 } ;
 
+} // namespace boost
+
+#endif // BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
+
+namespace boost {
+  
 #ifndef  BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
 template<class T>
 class optional<T&&>
@@ -1180,6 +1029,14 @@ class optional<T&&>
 } ;
 #endif
 
+} // namespace boost
+
+#ifndef BOOST_OPTIONAL_CONFIG_DONT_SPECIALIZE_OPTIONAL_REFS
+# include <boost/optional/detail/optional_reference_spec.hpp>
+#endif
+
+namespace boost {
+
 // Returns optional<T>(v)
 template<class T>
 inline
@@ -1268,6 +1125,10 @@ get_pointer ( optional<T>& opt )
   return opt.get_ptr() ;
 }
 
+} // namespace boost
+
+namespace boost {
+  
 // The following declaration prevents a bug where operator safe-bool is used upon streaming optional object if you forget the IO header.
 template<class CharType, class CharTrait>
 std::basic_ostream<CharType, CharTrait>&
@@ -1277,291 +1138,9 @@ operator<<(std::basic_ostream<CharType, CharTrait>& os, optional_detail::optiona
   return os;  
 }
 
-// optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values).
-// WARNING: This is UNLIKE pointers. Use equal_pointees()/less_pointess() in generic code instead.
-
-
-//
-// optional<T> vs optional<T> cases
-//
-
-template<class T>
-inline
-bool operator == ( optional<T> const& x, optional<T> const& y )
-{ return equal_pointees(x,y); }
-
-template<class T>
-inline
-bool operator < ( optional<T> const& x, optional<T> const& y )
-{ return less_pointees(x,y); }
-
-template<class T>
-inline
-bool operator != ( optional<T> const& x, optional<T> const& y )
-{ return !( x == y ) ; }
-
-template<class T>
-inline
-bool operator > ( optional<T> const& x, optional<T> const& y )
-{ return y < x ; }
-
-template<class T>
-inline
-bool operator <= ( optional<T> const& x, optional<T> const& y )
-{ return !( y < x ) ; }
-
-template<class T>
-inline
-bool operator >= ( optional<T> const& x, optional<T> const& y )
-{ return !( x < y ) ; }
-
-
-//
-// optional<T> vs T cases
-//
-template<class T>
-inline
-bool operator == ( optional<T> const& x, T const& y )
-{ return equal_pointees(x, optional<T>(y)); }
-
-template<class T>
-inline
-bool operator < ( optional<T> const& x, T const& y )
-{ return less_pointees(x, optional<T>(y)); }
-
-template<class T>
-inline
-bool operator != ( optional<T> const& x, T const& y )
-{ return !( x == y ) ; }
-
-template<class T>
-inline
-bool operator > ( optional<T> const& x, T const& y )
-{ return y < x ; }
-
-template<class T>
-inline
-bool operator <= ( optional<T> const& x, T const& y )
-{ return !( y < x ) ; }
-
-template<class T>
-inline
-bool operator >= ( optional<T> const& x, T const& y )
-{ return !( x < y ) ; }
-
-//
-// T vs optional<T> cases
-//
-
-template<class T>
-inline
-bool operator == ( T const& x, optional<T> const& y )
-{ return equal_pointees( optional<T>(x), y ); }
-
-template<class T>
-inline
-bool operator < ( T const& x, optional<T> const& y )
-{ return less_pointees( optional<T>(x), y ); }
-
-template<class T>
-inline
-bool operator != ( T const& x, optional<T> const& y )
-{ return !( x == y ) ; }
-
-template<class T>
-inline
-bool operator > ( T const& x, optional<T> const& y )
-{ return y < x ; }
-
-template<class T>
-inline
-bool operator <= ( T const& x, optional<T> const& y )
-{ return !( y < x ) ; }
-
-template<class T>
-inline
-bool operator >= ( T const& x, optional<T> const& y )
-{ return !( x < y ) ; }
-
-
-//
-// optional<T> vs none cases
-//
-
-template<class T>
-inline
-bool operator == ( optional<T> const& x, none_t ) BOOST_NOEXCEPT
-{ return !x; }
-
-template<class T>
-inline
-bool operator < ( optional<T> const& x, none_t )
-{ return less_pointees(x,optional<T>() ); }
-
-template<class T>
-inline
-bool operator != ( optional<T> const& x, none_t ) BOOST_NOEXCEPT
-{ return bool(x); }
-
-template<class T>
-inline
-bool operator > ( optional<T> const& x, none_t y )
-{ return y < x ; }
-
-template<class T>
-inline
-bool operator <= ( optional<T> const& x, none_t y )
-{ return !( y < x ) ; }
-
-template<class T>
-inline
-bool operator >= ( optional<T> const& x, none_t y )
-{ return !( x < y ) ; }
-
-//
-// none vs optional<T> cases
-//
-
-template<class T>
-inline
-bool operator == ( none_t , optional<T> const& y ) BOOST_NOEXCEPT
-{ return !y; }
-
-template<class T>
-inline
-bool operator < ( none_t , optional<T> const& y )
-{ return less_pointees(optional<T>() ,y); }
-
-template<class T>
-inline
-bool operator != ( none_t, optional<T> const& y ) BOOST_NOEXCEPT
-{ return bool(y); }
-
-template<class T>
-inline
-bool operator > ( none_t x, optional<T> const& y )
-{ return y < x ; }
-
-template<class T>
-inline
-bool operator <= ( none_t x, optional<T> const& y )
-{ return !( y < x ) ; }
-
-template<class T>
-inline
-bool operator >= ( none_t x, optional<T> const& y )
-{ return !( x < y ) ; }
-
-namespace optional_detail {
-
-template<bool use_default_constructor> struct swap_selector;
-
-template<>
-struct swap_selector<true>
-{
-    template<class T>
-    static void optional_swap ( optional<T>& x, optional<T>& y )
-    {
-        const bool hasX = !!x;
-        const bool hasY = !!y;
-
-        if ( !hasX && !hasY )
-            return;
-
-        if( !hasX )
-            x.emplace();
-        else if ( !hasY )
-            y.emplace();
-
-        // Boost.Utility.Swap will take care of ADL and workarounds for broken compilers
-        boost::swap(x.get(),y.get());
-
-        if( !hasX )
-            y = boost::none ;
-        else if( !hasY )
-            x = boost::none ;
-    }
-};
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-template<>
-struct swap_selector<false>
-{
-    template<class T>
-    static void optional_swap ( optional<T>& x, optional<T>& y ) 
-    //BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && BOOST_NOEXCEPT_EXPR(boost::swap(*x, *y)))
-    {
-        if(x)
-        {
-            if (y)
-            {
-                boost::swap(*x, *y);
-            }
-            else
-            {
-                y = boost::move(*x);
-                x = boost::none;
-            }
-        }
-        else
-        {
-            if (y)
-            {
-                x = boost::move(*y);
-                y = boost::none;
-            }
-        }
-    }
-};
-#else
-template<>
-struct swap_selector<false>
-{
-    template<class T>
-    static void optional_swap ( optional<T>& x, optional<T>& y )
-    {
-        const bool hasX = !!x;
-        const bool hasY = !!y;
-
-        if ( !hasX && hasY )
-        {
-            x = y.get();
-            y = boost::none ;
-        }
-        else if ( hasX && !hasY )
-        {
-            y = x.get();
-            x = boost::none ;
-        }
-        else if ( hasX && hasY )
-        {
-            // Boost.Utility.Swap will take care of ADL and workarounds for broken compilers
-            boost::swap(x.get(),y.get());
-        }
-    }
-};
-#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-
-} // namespace optional_detail
-
-#if (!defined BOOST_NO_CXX11_RVALUE_REFERENCES) && (!defined BOOST_CONFIG_RESTORE_OBSOLETE_SWAP_IMPLEMENTATION)
-
-template<class T>
-struct optional_swap_should_use_default_constructor : boost::false_type {} ;
-
-#else
-
-template<class T>
-struct optional_swap_should_use_default_constructor : has_nothrow_default_constructor<T> {} ;
-
-#endif //BOOST_NO_CXX11_RVALUE_REFERENCES
-
-template<class T> inline void swap ( optional<T>& x, optional<T>& y )
-  //BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && BOOST_NOEXCEPT_EXPR(boost::swap(*x, *y)))
-{
-    optional_detail::swap_selector<optional_swap_should_use_default_constructor<T>::value>::optional_swap(x, y);
-}
-
 } // namespace boost
 
-#endif
+#include <boost/optional/detail/optional_relops.hpp>
+#include <boost/optional/detail/optional_swap.hpp>
+
+#endif // header guard
index fb59682df6d69fef7eae3ef477cb8e08365a85db..c41a34d39866a6ee5463ab8287aedd787535c2d4 100644 (file)
@@ -1,4 +1,5 @@
 // Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
+// Copyright (C) 2016 Andrzej Krzemienski
 //
 // Use, modification, and distribution is subject to the Boost Software
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 #ifndef BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP
 #define BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP
 
+#include <boost/config/suffix.hpp>
 
 namespace boost {
 
 template<class T> class optional ;
 
-template<class T> void swap ( optional<T>& , optional<T>& );
+// This forward is needed to refer to namespace scope swap from the member swap
+template<class T> void swap ( optional<T>& , optional<T>& ) ;
 
 template<class T> struct optional_swap_should_use_default_constructor ;
 
+#ifndef BOOST_OPTIONAL_CONFIG_DONT_SPECIALIZE_OPTIONAL_REFS
+
+template<class T> class optional<T&> ;
+
+template<class T> void swap ( optional<T&>& , optional<T&>& ) BOOST_NOEXCEPT;
+
+#endif
+
 } // namespace boost
 
 #endif
index 4de1e70cd33fa4ddfa98325223f746867cd9e772..ac5c9da2cab23a0b609d0eb5760cc0c861f4fe03 100644 (file)
@@ -77,12 +77,24 @@ http://www.boost.org/LICENSE_1_0.txt)
 #   error "Multiple SIMD architectures detected, this cannot happen!"
 #endif
 
-#if defined(BOOST_HW_SIMD_X86_AVAILABLE)
-#   define BOOST_HW_SIMD BOOST_HW_SIMD_X86
+#if defined(BOOST_HW_SIMD_X86_AVAILABLE) && defined(BOOST_HW_SIMD_X86_AMD_AVAILABLE)
+    // If both standard _X86 and _X86_AMD are available,
+    // then take the biggest version of the two!
+#   if BOOST_HW_SIMD_X86 >= BOOST_HW_SIMD_X86_AMD
+#      define BOOST_HW_SIMD BOOST_HW_SIMD_X86
+#   else
+#      define BOOST_HW_SIMD BOOST_HW_SIMD_X86_AMD
+#   endif
 #endif
 
-#if defined(BOOST_HW_SIMD_X86_AMD_AVAILABLE)
-#   define BOOST_HW_SIMD BOOST_HW_SIMD_X86_AMD
+#if !defined(BOOST_HW_SIMD)
+    // At this point, only one of these two is defined
+#   if defined(BOOST_HW_SIMD_X86_AVAILABLE)
+#      define BOOST_HW_SIMD BOOST_HW_SIMD_X86
+#   endif
+#   if defined(BOOST_HW_SIMD_X86_AMD_AVAILABLE)
+#      define BOOST_HW_SIMD BOOST_HW_SIMD_X86_AMD
+#   endif
 #endif
 
 #if defined(BOOST_HW_SIMD_ARM_AVAILABLE)
index 0874bc4ea759f20c9efa96d4b6df590a6d1d72a1..88bd81e362b0cd8958c2e16e6b353052149a9ca3 100644 (file)
@@ -67,7 +67,7 @@ http://www.boost.org/LICENSE_1_0.txt)
 
      [[`__FMA__`] [BOOST_HW_SIMD_X86_FMA3_VERSION]]
 
-     [[`__AVX2__`] [BOOST_HW_SIMD_x86_AVX2_VERSION]]
+     [[`__AVX2__`] [BOOST_HW_SIMD_X86_AVX2_VERSION]]
      ]
 
  */
@@ -99,10 +99,10 @@ http://www.boost.org/LICENSE_1_0.txt)
 #if !defined(BOOST_HW_SIMD_X86) && defined(__SSE3__)
 #   define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE3_VERSION
 #endif
-#if !defined(BOOST_HW_SIMD_X86) && (defined(__SSE2__) || defined(_M_X64) || _M_IX86_FP >= 2)
+#if !defined(BOOST_HW_SIMD_X86) && (defined(__SSE2__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2))
 #   define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE2_VERSION
 #endif
-#if !defined(BOOST_HW_SIMD_X86) && (defined(__SSE__) || defined(_M_X64) || _M_IX86_FP >= 1)
+#if !defined(BOOST_HW_SIMD_X86) && (defined(__SSE__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 1))
 #   define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE_VERSION
 #endif
 #if !defined(BOOST_HW_SIMD_X86) && defined(__MMX__)
index 60fd4485ec1ee00aba4210f588efe6ec746e8ed1..c80d1ce2b775d4e70b2fae717cb46e8dbcf03458 100644 (file)
@@ -33,13 +33,13 @@ http://www.boost.org/LICENSE_1_0.txt)
  [table
      [[__predef_symbol__] [__predef_version__]]
 
-     [[`__SSE4A__`] [BOOST_HW_SIMD_x86_SSE4A_VERSION]]
+     [[`__SSE4A__`] [BOOST_HW_SIMD_X86_SSE4A_VERSION]]
 
-     [[`__FMA4__`] [BOOST_HW_SIMD_x86_FMA4_VERSION]]
+     [[`__FMA4__`] [BOOST_HW_SIMD_X86_FMA4_VERSION]]
 
-     [[`__XOP__`] [BOOST_HW_SIMD_x86_XOP_VERSION]]
+     [[`__XOP__`] [BOOST_HW_SIMD_X86_XOP_VERSION]]
 
-     [[`BOOST_HW_SIMD_X86`] [BOOST_HW_SIMD_x86]]
+     [[`BOOST_HW_SIMD_X86`] [BOOST_HW_SIMD_X86]]
      ]
 
  [note This predef includes every other x86 SIMD extensions and also has other
index a0a9e918bb06195d1328c162ba3befb1ba334e20..11157167c60521937e5c78ebe2871830f554749a 100644 (file)
@@ -30,9 +30,9 @@ http://www.boost.org/LICENSE_1_0.txt)
 #define BOOST_HW_SIMD_X86_AMD_SSE4A_VERSION BOOST_VERSION_NUMBER(4, 0, 0)
 
 /*`
- [heading `BOOST_HW_SIMD_X86_XOP_VERSION`]
+ [heading `BOOST_HW_SIMD_X86_FMA4_VERSION`]
 
- [@https://en.wikipedia.org/wiki/XOP_instruction_set XOP] x86 extension (AMD specific).
+ [@https://en.wikipedia.org/wiki/FMA_instruction_set#FMA4_instruction_set FMA4] x86 extension (AMD specific).
 
  Version number is: *5.1.0*.
  */
index 1985c97edca4e0d9b91e2ceca30c36c6bbd82470..9d36f0f31749666c3de92fb48b23d72977909b0c 100644 (file)
@@ -29,7 +29,7 @@ http://www.boost.org/LICENSE_1_0.txt)
     defined(__CYGWIN__) \
     )
 #   undef BOOST_OS_CYGWIN
-#   define BOOST_OS_CGYWIN BOOST_VERSION_NUMBER_AVAILABLE
+#   define BOOST_OS_CYGWIN BOOST_VERSION_NUMBER_AVAILABLE
 #endif
 
 #if BOOST_OS_CYGWIN
index 2fcdefa6948c3848f57369128caab2a405405590..8745c94976d6426dd43f759377c0070fba86f963 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Copyright Rene Rivera 2015
+Copyright Rene Rivera 2015-2016
 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)
@@ -10,6 +10,6 @@ http://www.boost.org/LICENSE_1_0.txt)
 
 #include <boost/predef/version_number.h>
 
-#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,4,0)
+#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,4,1)
 
 #endif
index 835b283b7e77a7ff613dca7b5e1610c244d05d6d..8be0e475456416c593f099e70454c9b84246a388 100644 (file)
@@ -73,7 +73,7 @@
 # define BOOST_PP_VARIADICS_MSVC 0
 # if !defined BOOST_PP_VARIADICS
 #    /* variadic support explicitly disabled for all untested compilers */
-#    if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5130 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI
+#    if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI
 #        define BOOST_PP_VARIADICS 0
 #    /* VC++ (C/C++) */
 #    elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__)) && !defined __clang__
index 3413e591955e62898dedaec08e052ac673570b64..727fdad058620905b732837eff025e5faa638c99 100644 (file)
@@ -36,7 +36,7 @@ namespace boost
 BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( const_iterator )
 
 template< typename C >
-struct range_const_iterator
+struct range_const_iterator_helper
         : extract_const_iterator<C>
 {};
 
@@ -45,7 +45,7 @@ struct range_const_iterator
 //////////////////////////////////////////////////////////////////////////
 
 template< typename Iterator >
-struct range_const_iterator<std::pair<Iterator,Iterator> >
+struct range_const_iterator_helper<std::pair<Iterator,Iterator> >
 {
     typedef Iterator type;
 };
@@ -55,7 +55,7 @@ struct range_const_iterator<std::pair<Iterator,Iterator> >
 //////////////////////////////////////////////////////////////////////////
 
 template< typename T, std::size_t sz >
-struct range_const_iterator< T[sz] >
+struct range_const_iterator_helper< T[sz] >
 {
     typedef const T* type;
 };
@@ -64,7 +64,7 @@ struct range_const_iterator< T[sz] >
 
 template<typename C, typename Enabler=void>
 struct range_const_iterator
-        : range_detail::range_const_iterator<
+        : range_detail::range_const_iterator_helper<
             BOOST_DEDUCED_TYPENAME remove_reference<C>::type
         >
 {
index 4fd1fd94a858cdb6adc6422a060f99781113339a..9dc48dc8ab92122d81e5b96f54941baafadaa704 100644 (file)
 /* disable our own file-iterators and mapfiles if we can't
  * support them: */
 #if defined(_WIN32)
-#  if defined(BOOST_REGEX_NO_W32) || BOOST_PLAT_WINDOWS_STORE
+#  if defined(BOOST_REGEX_NO_W32) || BOOST_PLAT_WINDOWS_RUNTIME
 #    define BOOST_REGEX_NO_FILEITER
 #  endif
 #else // defined(_WIN32)
index 4a80ab9c3258561db7326705ee422ed883e97282..d097eed959fb4d7c5d22464e4ddb84a0b0fd002d 100644 (file)
@@ -2650,7 +2650,7 @@ option_group_jump:
       //
       // allow backrefs to this mark:
       //
-      if((markid > 0) && (markid < (int)(sizeof(unsigned) * CHAR_BIT)))
+      if(markid < (int)(sizeof(unsigned) * CHAR_BIT))
          this->m_backrefs |= 1u << (markid - 1);
    }
    return true;
index 4873a0a85e14bfc12a734457c1150e70108a7bf5..256a7e4606c93014843c5bbd10a3c3cbfa0b8121 100644 (file)
@@ -225,11 +225,11 @@ public:
    mapfile_iterator() { node = 0; file = 0; offset = 0; }
    mapfile_iterator(const mapfile* f, long arg_position)
    {
+      BOOST_ASSERT(f);
       file = f;
       node = f->_first + arg_position / mapfile::buf_size;
       offset = arg_position % mapfile::buf_size;
-      if(file)
-         file->lock(node);
+      file->lock(node);
    }
    mapfile_iterator(const mapfile_iterator& i)
    {
index e21de6cf6a3c2e59230e2c5ff07815a90343e8b9..1c0046b75fd9b5349b07904b763d2e35d2a8e6c9 100644 (file)
@@ -22,6 +22,7 @@
 #ifdef __cplusplus
 #  include <boost/cstdint.hpp>
 #endif
+#include <boost/detail/workaround.hpp>
 
 #ifdef __cplusplus
 namespace boost{
@@ -71,7 +72,7 @@ typedef enum _match_flags
 
 } match_flags;
 
-#if defined(__BORLANDC__)
+#if defined(__BORLANDC__) || BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
 typedef unsigned long match_flag_type;
 #else
 typedef match_flags match_flag_type;
index dc54915062ee1d20d423a68dbfcd869458fc4adb..50af421ea2fa7bae538ca0d0022e056fbbe63a75 100644 (file)
 #  include BOOST_ABI_PREFIX
 #endif
 
+#ifndef BOOST_NO_CXX11_HDR_ATOMIC
+  #include <atomic>
+  #if ATOMIC_POINTER_LOCK_FREE == 2
+    #define BOOST_REGEX_MEM_BLOCK_CACHE_LOCK_FREE
+    #define BOOST_REGEX_ATOMIC_POINTER std::atomic
+  #endif
+#endif
+
 namespace boost{
 namespace BOOST_REGEX_DETAIL_NS{
 
+#ifdef BOOST_REGEX_MEM_BLOCK_CACHE_LOCK_FREE /* lock free implementation */
+struct mem_block_cache
+{
+  std::atomic<void*> cache[BOOST_REGEX_MAX_CACHE_BLOCKS];
+
+   ~mem_block_cache()
+   {
+     for (size_t i = 0;i < BOOST_REGEX_MAX_CACHE_BLOCKS; ++i) {
+       if (cache[i].load()) ::operator delete(cache[i].load());
+     }
+   }
+   void* get()
+   {
+     for (size_t i = 0;i < BOOST_REGEX_MAX_CACHE_BLOCKS; ++i) {
+       void* p = cache[i].load();
+       if (p != NULL) {
+         if (cache[i].compare_exchange_strong(p, NULL)) return p;
+       }
+     }
+     return ::operator new(BOOST_REGEX_BLOCKSIZE);
+   }
+   void put(void* ptr)
+   {
+     for (size_t i = 0;i < BOOST_REGEX_MAX_CACHE_BLOCKS; ++i) {
+       void* p = cache[i].load();
+       if (p == NULL) {
+         if (cache[i].compare_exchange_strong(p, ptr)) return;
+       }
+     }
+     ::operator delete(ptr);
+   }
+};
+
+
+#else /* lock-based implementation */
+
+
 struct mem_block_node
 {
    mem_block_node* next;
@@ -85,6 +130,7 @@ struct mem_block_cache
       }
    }
 };
+#endif
 
 extern mem_block_cache block_cache;
 
index 47bc33d5177f471519f53d0e916ed2cdebd2d525..bcefda8897d51be2638a4f141e4d6cf304b03e99 100644 (file)
@@ -1065,7 +1065,7 @@ template< class T > struct hash;
 
 template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p ) BOOST_NOEXCEPT
 {
-    return boost::hash< T* >()( p.get() );
+    return boost::hash< typename boost::shared_ptr<T>::element_type* >()( p.get() );
 }
 
 } // namespace boost
index c801e70f62215e8f9c18ba5177056a305cef5720..a5add88716396f6b903451c7f62a18c38b16b6eb 100644 (file)
@@ -1,5 +1,5 @@
 //
-// Copyright (c) Antony Polukhin, 2013-2014.
+// Copyright (c) Antony Polukhin, 2013-2015.
 //
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -200,7 +200,7 @@ inline bool stl_type_index::equal(const stl_type_index& rhs) const BOOST_NOEXCEP
 #ifdef BOOST_CLASSINFO_COMPARE_BY_NAMES
     return raw_name() == rhs.raw_name() || !std::strcmp(raw_name(), rhs.raw_name());
 #else
-    return *data_ == *rhs.data_;
+    return !!(*data_ == *rhs.data_);
 #endif
 }
 
index 57680f89f6907f3e8f7dcc35c58c472da2179087..7d651ce28d59c6ed8b67b22a93beaeb575dfdc41 100644 (file)
 #ifndef BOOST_TYPE_TRAITS_HPP
 #define BOOST_TYPE_TRAITS_HPP
 
-#include "boost/type_traits/add_const.hpp"
-#include "boost/type_traits/add_cv.hpp"
-#include "boost/type_traits/add_lvalue_reference.hpp"
-#include "boost/type_traits/add_pointer.hpp"
-#include "boost/type_traits/add_reference.hpp"
-#include "boost/type_traits/add_rvalue_reference.hpp"
-#include "boost/type_traits/add_volatile.hpp"
-#include "boost/type_traits/aligned_storage.hpp"
-#include "boost/type_traits/alignment_of.hpp"
-#include "boost/type_traits/common_type.hpp"
-#include "boost/type_traits/conditional.hpp"
-#include "boost/type_traits/copy_cv.hpp"
-#include "boost/type_traits/decay.hpp"
-#include "boost/type_traits/declval.hpp"
-#include "boost/type_traits/extent.hpp"
-#include "boost/type_traits/floating_point_promotion.hpp"
-#include "boost/type_traits/function_traits.hpp"
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_cv.hpp>
+#include <boost/type_traits/add_lvalue_reference.hpp>
+#include <boost/type_traits/add_pointer.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/add_rvalue_reference.hpp>
+#include <boost/type_traits/add_volatile.hpp>
+#include <boost/type_traits/aligned_storage.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#include <boost/type_traits/common_type.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/type_traits/copy_cv.hpp>
+#include <boost/type_traits/decay.hpp>
+#include <boost/type_traits/declval.hpp>
+#include <boost/type_traits/extent.hpp>
+#include <boost/type_traits/floating_point_promotion.hpp>
+#include <boost/type_traits/function_traits.hpp>
 
-#include "boost/type_traits/has_bit_and.hpp"
-#include "boost/type_traits/has_bit_and_assign.hpp"
-#include "boost/type_traits/has_bit_or.hpp"
-#include "boost/type_traits/has_bit_or_assign.hpp"
-#include "boost/type_traits/has_bit_xor.hpp"
-#include "boost/type_traits/has_bit_xor_assign.hpp"
-#include "boost/type_traits/has_complement.hpp"
-#include "boost/type_traits/has_dereference.hpp"
-#include "boost/type_traits/has_divides.hpp"
-#include "boost/type_traits/has_divides_assign.hpp"
-#include "boost/type_traits/has_equal_to.hpp"
-#include "boost/type_traits/has_greater.hpp"
-#include "boost/type_traits/has_greater_equal.hpp"
-#include "boost/type_traits/has_left_shift.hpp"
-#include "boost/type_traits/has_left_shift_assign.hpp"
-#include "boost/type_traits/has_less.hpp"
-#include "boost/type_traits/has_less_equal.hpp"
-#include "boost/type_traits/has_logical_and.hpp"
-#include "boost/type_traits/has_logical_not.hpp"
-#include "boost/type_traits/has_logical_or.hpp"
-#include "boost/type_traits/has_minus.hpp"
-#include "boost/type_traits/has_minus_assign.hpp"
-#include "boost/type_traits/has_modulus.hpp"
-#include "boost/type_traits/has_modulus_assign.hpp"
-#include "boost/type_traits/has_multiplies.hpp"
-#include "boost/type_traits/has_multiplies_assign.hpp"
-#include "boost/type_traits/has_negate.hpp"
+#include <boost/type_traits/has_bit_and.hpp>
+#include <boost/type_traits/has_bit_and_assign.hpp>
+#include <boost/type_traits/has_bit_or.hpp>
+#include <boost/type_traits/has_bit_or_assign.hpp>
+#include <boost/type_traits/has_bit_xor.hpp>
+#include <boost/type_traits/has_bit_xor_assign.hpp>
+#include <boost/type_traits/has_complement.hpp>
+#include <boost/type_traits/has_dereference.hpp>
+#include <boost/type_traits/has_divides.hpp>
+#include <boost/type_traits/has_divides_assign.hpp>
+#include <boost/type_traits/has_equal_to.hpp>
+#include <boost/type_traits/has_greater.hpp>
+#include <boost/type_traits/has_greater_equal.hpp>
+#include <boost/type_traits/has_left_shift.hpp>
+#include <boost/type_traits/has_left_shift_assign.hpp>
+#include <boost/type_traits/has_less.hpp>
+#include <boost/type_traits/has_less_equal.hpp>
+#include <boost/type_traits/has_logical_and.hpp>
+#include <boost/type_traits/has_logical_not.hpp>
+#include <boost/type_traits/has_logical_or.hpp>
+#include <boost/type_traits/has_minus.hpp>
+#include <boost/type_traits/has_minus_assign.hpp>
+#include <boost/type_traits/has_modulus.hpp>
+#include <boost/type_traits/has_modulus_assign.hpp>
+#include <boost/type_traits/has_multiplies.hpp>
+#include <boost/type_traits/has_multiplies_assign.hpp>
+#include <boost/type_traits/has_negate.hpp>
 #if !defined(__BORLANDC__) && !defined(__CUDACC__)
-#include "boost/type_traits/has_new_operator.hpp"
+#include <boost/type_traits/has_new_operator.hpp>
 #endif
-#include "boost/type_traits/has_not_equal_to.hpp"
-#include "boost/type_traits/has_nothrow_assign.hpp"
-#include "boost/type_traits/has_nothrow_constructor.hpp"
-#include "boost/type_traits/has_nothrow_copy.hpp"
-#include "boost/type_traits/has_nothrow_destructor.hpp"
-#include "boost/type_traits/has_plus.hpp"
-#include "boost/type_traits/has_plus_assign.hpp"
-#include "boost/type_traits/has_post_decrement.hpp"
-#include "boost/type_traits/has_post_increment.hpp"
-#include "boost/type_traits/has_pre_decrement.hpp"
-#include "boost/type_traits/has_pre_increment.hpp"
-#include "boost/type_traits/has_right_shift.hpp"
-#include "boost/type_traits/has_right_shift_assign.hpp"
-#include "boost/type_traits/has_trivial_assign.hpp"
-#include "boost/type_traits/has_trivial_constructor.hpp"
-#include "boost/type_traits/has_trivial_copy.hpp"
-#include "boost/type_traits/has_trivial_destructor.hpp"
-#include "boost/type_traits/has_trivial_move_assign.hpp"
-#include "boost/type_traits/has_trivial_move_constructor.hpp"
-#include "boost/type_traits/has_unary_minus.hpp"
-#include "boost/type_traits/has_unary_plus.hpp"
-#include "boost/type_traits/has_virtual_destructor.hpp"
+#include <boost/type_traits/has_not_equal_to.hpp>
+#include <boost/type_traits/has_nothrow_assign.hpp>
+#include <boost/type_traits/has_nothrow_constructor.hpp>
+#include <boost/type_traits/has_nothrow_copy.hpp>
+#include <boost/type_traits/has_nothrow_destructor.hpp>
+#include <boost/type_traits/has_plus.hpp>
+#include <boost/type_traits/has_plus_assign.hpp>
+#include <boost/type_traits/has_post_decrement.hpp>
+#include <boost/type_traits/has_post_increment.hpp>
+#include <boost/type_traits/has_pre_decrement.hpp>
+#include <boost/type_traits/has_pre_increment.hpp>
+#include <boost/type_traits/has_right_shift.hpp>
+#include <boost/type_traits/has_right_shift_assign.hpp>
+#include <boost/type_traits/has_trivial_assign.hpp>
+#include <boost/type_traits/has_trivial_constructor.hpp>
+#include <boost/type_traits/has_trivial_copy.hpp>
+#include <boost/type_traits/has_trivial_destructor.hpp>
+#include <boost/type_traits/has_trivial_move_assign.hpp>
+#include <boost/type_traits/has_trivial_move_constructor.hpp>
+#include <boost/type_traits/has_unary_minus.hpp>
+#include <boost/type_traits/has_unary_plus.hpp>
+#include <boost/type_traits/has_virtual_destructor.hpp>
 
-#include "boost/type_traits/integral_constant.hpp"
+#include <boost/type_traits/integral_constant.hpp>
 
-#include "boost/type_traits/is_abstract.hpp"
-#include "boost/type_traits/is_arithmetic.hpp"
-#include "boost/type_traits/is_array.hpp"
-#include "boost/type_traits/is_assignable.hpp"
-#include "boost/type_traits/is_base_and_derived.hpp"
-#include "boost/type_traits/is_base_of.hpp"
-#include "boost/type_traits/is_class.hpp"
-#include "boost/type_traits/is_complex.hpp"
-#include "boost/type_traits/is_compound.hpp"
-#include "boost/type_traits/is_const.hpp"
-#include "boost/type_traits/is_constructible.hpp"
-#include "boost/type_traits/is_convertible.hpp"
-#include "boost/type_traits/is_copy_assignable.hpp"
-#include "boost/type_traits/is_copy_constructible.hpp"
-#include "boost/type_traits/is_default_constructible.hpp"
-#include "boost/type_traits/is_destructible.hpp"
-#include "boost/type_traits/is_empty.hpp"
-#include "boost/type_traits/is_enum.hpp"
-#include "boost/type_traits/is_final.hpp"
-#include "boost/type_traits/is_float.hpp"
-#include "boost/type_traits/is_floating_point.hpp"
-#include "boost/type_traits/is_function.hpp"
-#include "boost/type_traits/is_fundamental.hpp"
-#include "boost/type_traits/is_integral.hpp"
-#include "boost/type_traits/is_lvalue_reference.hpp"
-#include "boost/type_traits/is_member_function_pointer.hpp"
-#include "boost/type_traits/is_member_object_pointer.hpp"
-#include "boost/type_traits/is_member_pointer.hpp"
-#include "boost/type_traits/is_nothrow_move_assignable.hpp"
-#include "boost/type_traits/is_nothrow_move_constructible.hpp"
-#include "boost/type_traits/is_object.hpp"
-#include "boost/type_traits/is_pod.hpp"
-#include "boost/type_traits/is_pointer.hpp"
-#include "boost/type_traits/is_polymorphic.hpp"
-#include "boost/type_traits/is_reference.hpp"
-#include "boost/type_traits/is_rvalue_reference.hpp"
-#include "boost/type_traits/is_same.hpp"
-#include "boost/type_traits/is_scalar.hpp"
-#include "boost/type_traits/is_signed.hpp"
-#include "boost/type_traits/is_stateless.hpp"
-#include "boost/type_traits/is_union.hpp"
-#include "boost/type_traits/is_unsigned.hpp"
-#include "boost/type_traits/is_virtual_base_of.hpp"
-#include "boost/type_traits/is_void.hpp"
-#include "boost/type_traits/is_volatile.hpp"
-#include "boost/type_traits/make_signed.hpp"
-#include "boost/type_traits/make_unsigned.hpp"
-#include "boost/type_traits/rank.hpp"
-#include "boost/type_traits/remove_all_extents.hpp"
-#include "boost/type_traits/remove_bounds.hpp"
-#include "boost/type_traits/remove_const.hpp"
-#include "boost/type_traits/remove_cv.hpp"
-#include "boost/type_traits/remove_extent.hpp"
-#include "boost/type_traits/remove_pointer.hpp"
-#include "boost/type_traits/remove_reference.hpp"
-#include "boost/type_traits/remove_volatile.hpp"
-#include "boost/type_traits/type_identity.hpp"
-#include "boost/type_traits/type_with_alignment.hpp"
+#include <boost/type_traits/is_abstract.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/type_traits/is_assignable.hpp>
+#include <boost/type_traits/is_base_and_derived.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/is_complex.hpp>
+#include <boost/type_traits/is_compound.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_constructible.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_copy_assignable.hpp>
+#include <boost/type_traits/is_copy_constructible.hpp>
+#include <boost/type_traits/is_default_constructible.hpp>
+#include <boost/type_traits/is_destructible.hpp>
+#include <boost/type_traits/is_empty.hpp>
+#include <boost/type_traits/is_enum.hpp>
+#include <boost/type_traits/is_final.hpp>
+#include <boost/type_traits/is_float.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/type_traits/is_fundamental.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_lvalue_reference.hpp>
+#include <boost/type_traits/is_member_function_pointer.hpp>
+#include <boost/type_traits/is_member_object_pointer.hpp>
+#include <boost/type_traits/is_member_pointer.hpp>
+#include <boost/type_traits/is_nothrow_move_assignable.hpp>
+#include <boost/type_traits/is_nothrow_move_constructible.hpp>
+#include <boost/type_traits/is_object.hpp>
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_polymorphic.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/is_rvalue_reference.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_scalar.hpp>
+#include <boost/type_traits/is_signed.hpp>
+#include <boost/type_traits/is_stateless.hpp>
+#include <boost/type_traits/is_union.hpp>
+#include <boost/type_traits/is_unsigned.hpp>
+#include <boost/type_traits/is_virtual_base_of.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#include <boost/type_traits/make_signed.hpp>
+#include <boost/type_traits/make_unsigned.hpp>
+#include <boost/type_traits/rank.hpp>
+#include <boost/type_traits/remove_all_extents.hpp>
+#include <boost/type_traits/remove_bounds.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_extent.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_volatile.hpp>
+#include <boost/type_traits/type_identity.hpp>
+#include <boost/type_traits/type_with_alignment.hpp>
 
 #if !(defined(__sgi) && defined(__EDG_VERSION__) && (__EDG_VERSION__ == 238))
-#include "boost/type_traits/integral_promotion.hpp"
-#include "boost/type_traits/promote.hpp"
+#include <boost/type_traits/integral_promotion.hpp>
+#include <boost/type_traits/promote.hpp>
 #endif
 
 #endif // BOOST_TYPE_TRAITS_HPP
index 526f259c879d574db8dea93b7ab58dfc132c6164..3c914154eec825eb01410af17e2007cc21900dd2 100644 (file)
@@ -49,9 +49,9 @@ template <class T> struct add_reference<T&>
 // these full specialisations are always required:
 template <> struct add_reference<void> { typedef void type; };
 #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-template <> struct add_reference<const void> { typedef void type; };
-template <> struct add_reference<const volatile void> { typedef void type; };
-template <> struct add_reference<volatile void> { typedef void type; };
+template <> struct add_reference<const void> { typedef const void type; };
+template <> struct add_reference<const volatile void> { typedef const volatile void type; };
+template <> struct add_reference<volatile void> { typedef volatile void type; };
 #endif
 
 } // namespace boost
index 09f0c6b885984e4502ce498d724adad9b31d41dc..171f5d450b03134a5dfe5a7f44b255df60431479 100644 (file)
 
 #include <cstddef> // for std::size_t
 
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
-#include "boost/type_traits/alignment_of.hpp"
-#include "boost/type_traits/type_with_alignment.hpp"
-#include "boost/type_traits/is_pod.hpp"
-#include "boost/type_traits/conditional.hpp"
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#include <boost/type_traits/type_with_alignment.hpp>
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/conditional.hpp>
 
 namespace boost {
 
index 5c4303b9ec549a56bada472d7da4302d3da44116..c887a897f87038b8f1f4d5b9671ce46ced43aa35 100644 (file)
@@ -12,6 +12,7 @@
 #include <boost/config.hpp>
 #include <boost/type_traits/decay.hpp>
 #include <boost/type_traits/declval.hpp>
+#include <boost/detail/workaround.hpp>
 
 #if defined(BOOST_NO_CXX11_DECLTYPE)
 #include <boost/type_traits/detail/common_type_impl.hpp>
index 72110022188c17debe6f8f30ea7556dd76815a58..8c091583c5b5257062eae99c3cb9796d82c295dd 100644 (file)
@@ -35,12 +35,16 @@ template<> struct arithmetic_type<2>
     typedef char (&result_type) [2];
 };
 
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
+
 template<> struct arithmetic_type<3>
 {
     typedef wchar_t type;
     typedef char (&result_type) [3];
 };
 
+#endif
+
 // There are five standard signed integer types:
 // “signed char”, “short int”, “int”, “long int”, and “long long int”.
 
@@ -170,7 +174,9 @@ private:
 
     static arithmetic_type<1>::result_type select( arithmetic_type<1>::type );
     static arithmetic_type<2>::result_type select( arithmetic_type<2>::type );
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
     static arithmetic_type<3>::result_type select( arithmetic_type<3>::type );
+#endif
     static arithmetic_type<4>::result_type select( arithmetic_type<4>::type );
     static arithmetic_type<5>::result_type select( arithmetic_type<5>::type );
     static arithmetic_type<6>::result_type select( arithmetic_type<6>::type );
index 7910e545e19ab8142fb699d2da53a0fd0ad3ac95..f3beeb21bbaa8a27049f281a2f864690fa9bf1f3 100644 (file)
@@ -25,12 +25,12 @@ template<template<class...> class F, class... T>
 struct mp_valid_impl
 {
     template<template<class...> class G, class = G<T...>>
-    static boost::true_type check(int);
+    static boost::true_type check_s(int);
 
     template<template<class...> class>
-    static boost::false_type check(...);
+    static boost::false_type check_s(...);
 
-    using type = decltype(check<F>(0));
+    using type = decltype(check_s<F>(0));
 };
 
 template<template<class...> class F, class... T>
index a7312a19e93409f08ebd188be99ee0f442c3b975..65fbeefc39120e30ea3e5fbf4d5c1ed846ddf484 100644 (file)
@@ -24,7 +24,7 @@
 #include <boost/type_traits/remove_reference.hpp>
 #endif
 #endif
-#if defined(__GNUC__) || defined(__SUNPRO_CC)
+#if defined(__GNUC__) || defined(__SUNPRO_CC) || defined(__clang__)
 #include <boost/type_traits/is_const.hpp>
 #include <boost/type_traits/is_volatile.hpp>
 #include <boost/type_traits/is_assignable.hpp>
index e5af89fe593a6520e3200ecbeaca1110f192e6c0..a71d42e6e4a368fbc1c13727660a1f7774aee073 100644 (file)
@@ -17,7 +17,7 @@
 #if defined(BOOST_MSVC) || defined(BOOST_INTEL)
 #include <boost/type_traits/has_trivial_constructor.hpp>
 #endif
-#if defined(__GNUC__ ) || defined(__SUNPRO_CC)
+#if defined(__GNUC__ ) || defined(__SUNPRO_CC) || defined(__clang__)
 #include <boost/type_traits/is_default_constructible.hpp>
 #endif
 
index a5e625d1aeaac62e6989613fe56d1914edab915f..a434dae726ce78abc8209b53f355727b4de86df6 100644 (file)
@@ -13,7 +13,7 @@
 #include <boost/type_traits/intrinsics.hpp>
 #include <boost/type_traits/integral_constant.hpp>
 
-#if !defined(BOOST_HAS_TRIVIAL_ASSIGN) || defined(BOOST_MSVC) || defined(__GNUC__) || defined(BOOST_INTEL) || defined(__SUNPRO_CC) || defined(__clang)
+#if !defined(BOOST_HAS_TRIVIAL_ASSIGN) || defined(BOOST_MSVC) || defined(__GNUC__) || defined(BOOST_INTEL) || defined(__SUNPRO_CC) || defined(__clang__)
 #include <boost/type_traits/is_pod.hpp>
 #include <boost/type_traits/is_const.hpp>
 #include <boost/type_traits/is_volatile.hpp>
index 763283d78c027abef12aa3b0e79cbbc43c1943fa..9a3a61ff97a6ccc3bef5f6a834eb424b364dfe5d 100644 (file)
@@ -21,7 +21,7 @@
 #include <boost/type_traits/is_same.hpp>
 #endif
 
-#if defined(__GNUC__) || defined(__clang) || defined(__SUNPRO_CC)
+#if defined(__GNUC__) || defined(__clang__) || defined(__SUNPRO_CC)
 #include <boost/type_traits/is_destructible.hpp>
 #endif
 
index 7fd63f8969e043b5a9b5681e496a7c8d4160a282..0b7d960e7d6c056d35b4faedf0ce0415a0a5065b 100644 (file)
 #include <boost/type_traits/integral_constant.hpp>
 #include <boost/detail/workaround.hpp>
 
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
+#include <boost/type_traits/is_abstract.hpp>
+#endif
+
 #if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
 
 #include <boost/type_traits/detail/yes_no_type.hpp>
@@ -28,10 +32,25 @@ namespace boost{
          template<typename>
          static boost::type_traits::no_type test(...);
       };
-
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
+      template<class T, bool b> 
+      struct is_default_constructible_abstract_filter
+      {
+          static const bool value = sizeof(is_default_constructible_imp::test<T>(0)) == sizeof(boost::type_traits::yes_type);
+      };
+      template<class T> 
+      struct is_default_constructible_abstract_filter<T, true>
+      {
+          static const bool value = false;
+      };
+#endif
    }
 
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
+   template <class T> struct is_default_constructible : public integral_constant<bool, detail::is_default_constructible_abstract_filter<T, boost::is_abstract<T>::value>::value>{};
+#else
    template <class T> struct is_default_constructible : public integral_constant<bool, sizeof(detail::is_default_constructible_imp::test<T>(0)) == sizeof(boost::type_traits::yes_type)>{};
+#endif
    template <class T, std::size_t N> struct is_default_constructible<T[N]> : public is_default_constructible<T>{};
    template <class T> struct is_default_constructible<T[]> : public is_default_constructible<T>{};
    template <class T> struct is_default_constructible<T&> : public integral_constant<bool, false>{};
index 9755430ecf4518ab142192ba7a7adc38e3cc2d47..4fb5bd8a6d086f49a224fa74db976eda7266c7ba 100644 (file)
@@ -33,7 +33,7 @@ template <class T> struct is_nothrow_move_assignable<T&> : public false_type{};
 template <class T> struct is_nothrow_move_assignable<T&&> : public false_type{};
 #endif
 
-#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR)
+#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
 
 namespace detail{
 
index 8f4cee2cf902ca5fbb3baf0e5d3a26430a68b64e..4c8f7347264a7f936ef755521885881d43cf37bc 100644 (file)
@@ -26,7 +26,7 @@ struct is_nothrow_move_constructible : public integral_constant<bool, BOOST_IS_N
 template <class T> struct is_nothrow_move_constructible<volatile T> : public ::boost::false_type {};
 template <class T> struct is_nothrow_move_constructible<const volatile T> : public ::boost::false_type{};
 
-#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
+#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
 
 #include <boost/type_traits/declval.hpp>
 #include <boost/utility/enable_if.hpp>
index fce02ec7ba9c54d250e53750c8052833bd74bb7a..ce6f79f8400a57138a4c8620da37bf5a7b5607cf 100644 (file)
@@ -19,7 +19,7 @@
 //  BOOST_VERSION / 100 % 1000 is the minor version
 //  BOOST_VERSION / 100000 is the major version
 
-#define BOOST_VERSION 106000
+#define BOOST_VERSION 106100
 
 //
 //  BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
@@ -27,6 +27,6 @@
 //  number, y is the minor version number, and z is the patch level if not 0.
 //  This is used by <config/auto_link.hpp> to select which library version to link to.
 
-#define BOOST_LIB_VERSION "1_60"
+#define BOOST_LIB_VERSION "1_61"
 
 #endif
index 3711a9a09c4902bbc0fcb44b3da34a90720fa0c6..1531d948a0bb81abb104a3daf005cebd9e2eb0b3 100644 (file)
@@ -182,10 +182,12 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int code, const regex_tA*
          }
       }
 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
-      (::sprintf_s)(localbuf, 5, "%d", 0);
+      int r = (::sprintf_s)(localbuf, 5, "%d", 0);
 #else
-      (std::sprintf)(localbuf, "%d", 0);
+      int r = (std::sprintf)(localbuf, "%d", 0);
 #endif
+      if(r < 0)
+         return 0; // sprintf failed
       if(std::strlen(localbuf) < buf_size)
          BOOST_REGEX_DETAIL_NS::strcpy_s(buf, buf_size, localbuf);
       return std::strlen(localbuf) + 1;
index 03057aac9c56e152b5db26303f717b921784de1c..e9e9762748e4dfb68806d58970be673eff9d9cea 100644 (file)
@@ -191,7 +191,9 @@ BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void* p)
 
 #else
 
-#ifdef BOOST_HAS_THREADS
+#if defined(BOOST_REGEX_MEM_BLOCK_CACHE_LOCK_FREE)
+mem_block_cache block_cache = { { {nullptr} } } ;
+#elif defined(BOOST_HAS_THREADS)
 mem_block_cache block_cache = { 0, 0, BOOST_STATIC_MUTEX_INIT, };
 #else
 mem_block_cache block_cache = { 0, 0, };