Replace Boost.Signals with Boost.Signals2

Boost.Signals is deprecated. This fixes bug #9943.
The only thing left to do is to rewrite (or get rid of) the boost -mt test
in config/lyxinclude.m4 not to use signals anymore.
This commit is contained in:
Georg Baum 2016-06-09 22:25:34 +02:00
parent fe86240d64
commit 2047ea5eb4
332 changed files with 25874 additions and 11041 deletions

View File

@ -7,42 +7,25 @@ EXTRA_DIST = boost \
LICENSE_1_0.txt \
libs/CMakeLists.txt \
libs/regex/CMakeLists.txt \
libs/regex/src/CMakeLists.txt \
libs/signals/CMakeLists.txt \
libs/signals/src/CMakeLists.txt
libs/regex/src/CMakeLists.txt
AM_CPPFLAGS += -DBOOST_USER_CONFIG="<config.h>"
AM_CPPFLAGS += $(BOOST_INCLUDES)
if LYX_USE_STD_REGEX
else
# This version is more than three times faster than the one below
if MONOLITHIC_BOOST
if LYX_USE_STD_REGEX
liblyxboost_a_SOURCES = \
lyxboostsignals.cpp
else
liblyxboost_a_SOURCES = \
lyxboost.cpp \
libs/regex/src/instances.cpp \
libs/regex/src/cpp_regex_traits.cpp \
libs/regex/src/c_regex_traits.cpp
endif #LYX_USE_STD_REGEX
else
if LYX_USE_STD_REGEX
liblyxboost_a_SOURCES = \
libs/signals/src/connection.cpp \
libs/signals/src/named_slot_map.cpp \
libs/signals/src/signal_base.cpp \
libs/signals/src/slot.cpp \
libs/signals/src/trackable.cpp
else
@ -61,14 +44,8 @@ liblyxboost_a_SOURCES = \
libs/regex/src/w32_regex_traits.cpp \
libs/regex/src/wide_posix_api.cpp \
libs/regex/src/winstances.cpp \
libs/regex/src/static_mutex.cpp \
libs/signals/src/connection.cpp \
libs/signals/src/named_slot_map.cpp \
libs/signals/src/signal_base.cpp \
libs/signals/src/slot.cpp \
libs/signals/src/trackable.cpp
endif #LYX_USE_STD_REGEX
libs/regex/src/static_mutex.cpp
endif #MONOLITHIC_BOOST
endif #LYX_USE_STD_REGEX

View File

@ -1,20 +0,0 @@
/*
(c) 2014-2015 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_ALIGN_HPP
#define BOOST_ALIGN_ALIGN_HPP
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_STD_ALIGN)
#include <boost/align/detail/align_cxx11.hpp>
#else
#include <boost/align/detail/align.hpp>
#endif
#endif

View File

@ -1,38 +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_ALIGN_HPP
#define BOOST_ALIGN_DETAIL_ALIGN_HPP
#include <boost/align/detail/is_alignment.hpp>
#include <boost/assert.hpp>
namespace boost {
namespace alignment {
inline void* align(std::size_t alignment, std::size_t size,
void*& ptr, std::size_t& space)
{
BOOST_ASSERT(detail::is_alignment(alignment));
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 0;
}
} /* .alignment */
} /* .boost */
#endif

View File

@ -1,22 +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_ALIGN_CXX11_HPP
#define BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP
#include <memory>
namespace boost {
namespace alignment {
using std::align;
} /* .alignment */
} /* .boost */
#endif

View File

@ -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_IS_ALIGNMENT_HPP
#define BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP
#include <boost/config.hpp>
#include <cstddef>
namespace boost {
namespace alignment {
namespace detail {
BOOST_CONSTEXPR inline bool is_alignment(std::size_t value)
BOOST_NOEXCEPT
{
return (value > 0) && ((value & (value - 1)) == 0);
}
} /* .detail */
} /* .alignment */
} /* .boost */
#endif

View File

@ -0,0 +1,18 @@
//-----------------------------------------------------------------------------
// boost aligned_storage.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002-2003
// Eric Friedman, Itay Maman
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_ALIGNED_STORAGE_HPP
#define BOOST_ALIGNED_STORAGE_HPP
#include <boost/type_traits/aligned_storage.hpp>
#endif // BOOST_ALIGNED_STORAGE_HPP

41
3rdparty/boost/boost/bind.hpp vendored Normal file
View File

@ -0,0 +1,41 @@
#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

62
3rdparty/boost/boost/bind/arg.hpp vendored Normal file
View File

@ -0,0 +1,62 @@
#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

2256
3rdparty/boost/boost/bind/bind.hpp vendored Normal file

File diff suppressed because it is too large Load Diff

117
3rdparty/boost/boost/bind/bind_cc.hpp vendored Normal file
View File

@ -0,0 +1,117 @@
//
// 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));
}

View File

@ -0,0 +1,228 @@
//
// 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));
}

441
3rdparty/boost/boost/bind/bind_mf_cc.hpp vendored Normal file
View File

@ -0,0 +1,441 @@
//
// 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));
}

View File

@ -0,0 +1,345 @@
//
// 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_;

View File

@ -0,0 +1,62 @@
#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

475
3rdparty/boost/boost/bind/storage.hpp vendored Normal file
View File

@ -0,0 +1,475 @@
#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

106
3rdparty/boost/boost/blank.hpp vendored Normal file
View File

@ -0,0 +1,106 @@
//-----------------------------------------------------------------------------
// boost blank.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003
// Eric Friedman
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_BLANK_HPP
#define BOOST_BLANK_HPP
#include "boost/blank_fwd.hpp"
#if !defined(BOOST_NO_IOSTREAM)
#include <iosfwd> // for std::basic_ostream forward declare
#include "boost/detail/templated_streams.hpp"
#endif // BOOST_NO_IOSTREAM
#include "boost/mpl/bool.hpp"
#include "boost/type_traits/is_empty.hpp"
#include "boost/type_traits/is_pod.hpp"
#include "boost/type_traits/is_stateless.hpp"
namespace boost {
struct blank
{
};
// type traits specializations
//
template <>
struct is_pod< blank >
: mpl::true_
{
};
template <>
struct is_empty< blank >
: mpl::true_
{
};
template <>
struct is_stateless< blank >
: mpl::true_
{
};
// relational operators
//
inline bool operator==(const blank&, const blank&)
{
return true;
}
inline bool operator<=(const blank&, const blank&)
{
return true;
}
inline bool operator>=(const blank&, const blank&)
{
return true;
}
inline bool operator!=(const blank&, const blank&)
{
return false;
}
inline bool operator<(const blank&, const blank&)
{
return false;
}
inline bool operator>(const blank&, const blank&)
{
return false;
}
// streaming support
//
#if !defined(BOOST_NO_IOSTREAM)
BOOST_TEMPLATED_STREAM_TEMPLATE(E,T)
inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
BOOST_TEMPLATED_STREAM(ostream, E,T)& out
, const blank&
)
{
// (output nothing)
return out;
}
#endif // BOOST_NO_IOSTREAM
} // namespace boost
#endif // BOOST_BLANK_HPP

22
3rdparty/boost/boost/blank_fwd.hpp vendored Normal file
View File

@ -0,0 +1,22 @@
//-----------------------------------------------------------------------------
// boost blank_fwd.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003
// Eric Friedman
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_BLANK_FWD_HPP
#define BOOST_BLANK_FWD_HPP
namespace boost {
struct blank;
} // namespace boost
#endif // BOOST_BLANK_FWD_HPP

20
3rdparty/boost/boost/call_traits.hpp vendored Normal file
View File

@ -0,0 +1,20 @@
// (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

40
3rdparty/boost/boost/core/is_same.hpp vendored Normal file
View File

@ -0,0 +1,40 @@
#ifndef BOOST_CORE_IS_SAME_HPP_INCLUDED
#define BOOST_CORE_IS_SAME_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
// is_same<T1,T2>::value is true when T1 == T2
//
// Copyright 2014 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/config.hpp>
namespace boost
{
namespace core
{
template< class T1, class T2 > struct is_same
{
BOOST_STATIC_CONSTANT( bool, value = false );
};
template< class T > struct is_same< T, T >
{
BOOST_STATIC_CONSTANT( bool, value = true );
};
} // namespace core
} // namespace boost
#endif // #ifndef BOOST_CORE_IS_SAME_HPP_INCLUDED

View File

@ -0,0 +1,172 @@
// (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

27
3rdparty/boost/boost/detail/is_xxx.hpp vendored Normal file
View File

@ -0,0 +1,27 @@
// Copyright David Abrahams 2005. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_DETAIL_IS_XXX_DWA20051011_HPP
# define BOOST_DETAIL_IS_XXX_DWA20051011_HPP
# include <boost/config.hpp>
# include <boost/mpl/bool.hpp>
# include <boost/preprocessor/enum_params.hpp>
# define BOOST_DETAIL_IS_XXX_DEF(name, qualified_name, nargs) \
template <class T> \
struct is_##name : mpl::false_ \
{ \
}; \
\
template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class T) > \
struct is_##name< \
qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, T) > \
> \
: mpl::true_ \
{ \
};
#endif // BOOST_DETAIL_IS_XXX_DWA20051011_HPP

View File

@ -0,0 +1,74 @@
//-----------------------------------------------------------------------------
// boost detail/templated_streams.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003
// Eric Friedman
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_DETAIL_TEMPLATED_STREAMS_HPP
#define BOOST_DETAIL_TEMPLATED_STREAMS_HPP
#include "boost/config.hpp"
///////////////////////////////////////////////////////////////////////////////
// (detail) BOOST_TEMPLATED_STREAM_* macros
//
// Provides workaround platforms without stream class templates.
//
#if !defined(BOOST_NO_STD_LOCALE)
#define BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) \
template < typename E , typename T >
#define BOOST_TEMPLATED_STREAM_TEMPLATE_ALLOC(E,T,A) \
template < typename E , typename T , typename A >
#define BOOST_TEMPLATED_STREAM_ARGS(E,T) \
typename E , typename T
#define BOOST_TEMPLATED_STREAM_ARGS_ALLOC(E,T,A) \
typename E , typename T , typename A
#define BOOST_TEMPLATED_STREAM_COMMA ,
#define BOOST_TEMPLATED_STREAM_ELEM(E) E
#define BOOST_TEMPLATED_STREAM_TRAITS(T) T
#define BOOST_TEMPLATED_STREAM_ALLOC(A) A
#define BOOST_TEMPLATED_STREAM(X,E,T) \
BOOST_JOIN(std::basic_,X)< E , T >
#define BOOST_TEMPLATED_STREAM_WITH_ALLOC(X,E,T,A) \
BOOST_JOIN(std::basic_,X)< E , T , A >
#else // defined(BOOST_NO_STD_LOCALE)
#define BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) /**/
#define BOOST_TEMPLATED_STREAM_TEMPLATE_ALLOC(E,T,A) /**/
#define BOOST_TEMPLATED_STREAM_ARGS(E,T) /**/
#define BOOST_TEMPLATED_STREAM_ARGS_ALLOC(E,T,A) /**/
#define BOOST_TEMPLATED_STREAM_COMMA /**/
#define BOOST_TEMPLATED_STREAM_ELEM(E) char
#define BOOST_TEMPLATED_STREAM_TRAITS(T) std::char_traits<char>
#define BOOST_TEMPLATED_STREAM_ALLOC(A) std::allocator<char>
#define BOOST_TEMPLATED_STREAM(X,E,T) \
std::X
#define BOOST_TEMPLATED_STREAM_WITH_ALLOC(X,E,T,A) \
std::X
#endif // BOOST_NO_STD_LOCALE
#endif // BOOST_DETAIL_TEMPLATED_STREAMS_HPP

View File

@ -1,18 +0,0 @@
#ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED
#define BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED
//
// enable_shared_from_this.hpp
//
// Copyright (c) 2002 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
//
// http://www.boost.org/libs/smart_ptr/enable_shared_from_this.html
//
#include <boost/smart_ptr/enable_shared_from_this.hpp>
#endif // #ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED

View File

@ -1,45 +0,0 @@
// Boost.Function library - Typeof support
// Copyright (C) Douglas Gregor 2008
//
// 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)
//
// For more information, see http://www.boost.org
#ifndef BOOST_FUNCTION_TYPEOF_HPP
#define BOOST_FUNCTION_TYPEOF_HPP
#include <boost/function/function_fwd.hpp>
#include <boost/typeof/typeof.hpp>
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
BOOST_TYPEOF_REGISTER_TYPE(boost::bad_function_call)
#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function, (typename))
#endif
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function0, (typename))
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function1, (typename)(typename))
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function2, (typename)(typename)(typename))
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function3,
(typename)(typename)(typename)(typename))
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function4,
(typename)(typename)(typename)(typename)(typename))
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function5,
(typename)(typename)(typename)(typename)(typename)(typename))
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function6,
(typename)(typename)(typename)(typename)(typename)(typename)(typename))
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function7,
(typename)(typename)(typename)(typename)(typename)(typename)(typename)
(typename))
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function8,
(typename)(typename)(typename)(typename)(typename)(typename)(typename)
(typename)(typename))
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function9,
(typename)(typename)(typename)(typename)(typename)(typename)(typename)
(typename)(typename)(typename))
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::function10,
(typename)(typename)(typename)(typename)(typename)(typename)(typename)
(typename)(typename)(typename)(typename))
#endif

View File

@ -0,0 +1,62 @@
// (C) Copyright Jeremy Siek 2001.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// Revision History:
// 27 Feb 2001 Jeremy Siek
// Initial checkin.
#ifndef BOOST_FUNCTION_OUTPUT_ITERATOR_HPP
#define BOOST_FUNCTION_OUTPUT_ITERATOR_HPP
#include <iterator>
namespace boost {
namespace iterators {
template <class UnaryFunction>
class function_output_iterator {
typedef function_output_iterator self;
public:
typedef std::output_iterator_tag iterator_category;
typedef void value_type;
typedef void difference_type;
typedef void pointer;
typedef void reference;
explicit function_output_iterator() {}
explicit function_output_iterator(const UnaryFunction& f)
: m_f(f) {}
struct output_proxy {
output_proxy(UnaryFunction& f) : m_f(f) { }
template <class T> output_proxy& operator=(const T& value) {
m_f(value);
return *this;
}
UnaryFunction& m_f;
};
output_proxy operator*() { return output_proxy(m_f); }
self& operator++() { return *this; }
self& operator++(int) { return *this; }
private:
UnaryFunction m_f;
};
template <class UnaryFunction>
inline function_output_iterator<UnaryFunction>
make_function_output_iterator(const UnaryFunction& f = UnaryFunction()) {
return function_output_iterator<UnaryFunction>(f);
}
} // namespace iterators
using iterators::function_output_iterator;
using iterators::make_function_output_iterator;
} // namespace boost
#endif // BOOST_FUNCTION_OUTPUT_ITERATOR_HPP

View File

@ -1,18 +0,0 @@
#ifndef BOOST_INTRUSIVE_PTR_HPP_INCLUDED
#define BOOST_INTRUSIVE_PTR_HPP_INCLUDED
//
// intrusive_ptr.hpp
//
// Copyright (c) 2001, 2002 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/smart_ptr/intrusive_ptr.html for documentation.
//
#include <boost/smart_ptr/intrusive_ptr.hpp>
#endif // #ifndef BOOST_INTRUSIVE_PTR_HPP_INCLUDED

31
3rdparty/boost/boost/is_placeholder.hpp vendored Normal file
View File

@ -0,0 +1,31 @@
#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

View File

@ -1,54 +0,0 @@
// last_value function object (documented as part of Boost.Signals)
// Copyright Douglas Gregor 2001-2003. 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)
// For more information, see http://www.boost.org/libs/signals
#ifndef BOOST_LAST_VALUE_HPP
#define BOOST_LAST_VALUE_HPP
#include <cassert>
#include <boost/config.hpp>
namespace boost {
template<typename T>
struct last_value {
typedef T result_type;
template<typename InputIterator>
T operator()(InputIterator first, InputIterator last) const
{
assert(first != last);
T value = *first++;
while (first != last)
value = *first++;
return value;
}
};
template<>
struct last_value<void> {
#ifdef BOOST_NO_VOID_RETURNS
struct unusable {};
public:
typedef unusable result_type;
#else
public:
typedef void result_type;
#endif // BOOST_NO_VOID_RETURNS
template<typename InputIterator>
result_type
operator()(InputIterator first, InputIterator last) const
{
while (first != last)
*first++;
return result_type();
}
};
}
#endif // BOOST_SIGNALS_LAST_VALUE_HPP

View File

@ -1,17 +0,0 @@
#ifndef BOOST_MAKE_SHARED_HPP_INCLUDED
#define BOOST_MAKE_SHARED_HPP_INCLUDED
// make_shared.hpp
//
// Copyright (c) 2007, 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/smart_ptr/make_shared.html
// for documentation.
#include <boost/smart_ptr/make_shared.hpp>
#endif // #ifndef BOOST_MAKE_SHARED_HPP_INCLUDED

View File

@ -0,0 +1,97 @@
// Boost common_factor_ct.hpp header file ----------------------------------//
// (C) Copyright Daryle Walker and Stephen Cleary 2001-2002.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#ifndef BOOST_MATH_COMMON_FACTOR_CT_HPP
#define BOOST_MATH_COMMON_FACTOR_CT_HPP
#include <boost/math_fwd.hpp> // self include
#include <boost/config.hpp> // for BOOST_STATIC_CONSTANT, etc.
#include <boost/mpl/integral_c.hpp>
namespace boost
{
namespace math
{
// Implementation details --------------------------------------------------//
namespace detail
{
// Build GCD with Euclid's recursive algorithm
template < static_gcd_type Value1, static_gcd_type Value2 >
struct static_gcd_helper_t
{
private:
BOOST_STATIC_CONSTANT( static_gcd_type, new_value1 = Value2 );
BOOST_STATIC_CONSTANT( static_gcd_type, new_value2 = Value1 % Value2 );
#ifndef __BORLANDC__
#define BOOST_DETAIL_GCD_HELPER_VAL(Value) static_cast<static_gcd_type>(Value)
#else
typedef static_gcd_helper_t self_type;
#define BOOST_DETAIL_GCD_HELPER_VAL(Value) (self_type:: Value )
#endif
typedef static_gcd_helper_t< BOOST_DETAIL_GCD_HELPER_VAL(new_value1),
BOOST_DETAIL_GCD_HELPER_VAL(new_value2) > next_step_type;
#undef BOOST_DETAIL_GCD_HELPER_VAL
public:
BOOST_STATIC_CONSTANT( static_gcd_type, value = next_step_type::value );
};
// Non-recursive case
template < static_gcd_type Value1 >
struct static_gcd_helper_t< Value1, 0UL >
{
BOOST_STATIC_CONSTANT( static_gcd_type, value = Value1 );
};
// Build the LCM from the GCD
template < static_gcd_type Value1, static_gcd_type Value2 >
struct static_lcm_helper_t
{
typedef static_gcd_helper_t<Value1, Value2> gcd_type;
BOOST_STATIC_CONSTANT( static_gcd_type, value = Value1 / gcd_type::value
* Value2 );
};
// Special case for zero-GCD values
template < >
struct static_lcm_helper_t< 0UL, 0UL >
{
BOOST_STATIC_CONSTANT( static_gcd_type, value = 0UL );
};
} // namespace detail
// Compile-time greatest common divisor evaluator class declaration --------//
template < static_gcd_type Value1, static_gcd_type Value2 >
struct static_gcd : public mpl::integral_c<static_gcd_type, (detail::static_gcd_helper_t<Value1, Value2>::value) >
{
}; // boost::math::static_gcd
// Compile-time least common multiple evaluator class declaration ----------//
template < static_gcd_type Value1, static_gcd_type Value2 >
struct static_lcm : public mpl::integral_c<static_gcd_type, (detail::static_lcm_helper_t<Value1, Value2>::value) >
{
}; // boost::math::static_lcm
} // namespace math
} // namespace boost
#endif // BOOST_MATH_COMMON_FACTOR_CT_HPP

108
3rdparty/boost/boost/math_fwd.hpp vendored Normal file
View File

@ -0,0 +1,108 @@
// Boost math_fwd.hpp header file ------------------------------------------//
// (C) Copyright Hubert Holin and Daryle Walker 2001-2002. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/math for documentation.
#ifndef BOOST_MATH_FWD_HPP
#define BOOST_MATH_FWD_HPP
#include <boost/cstdint.hpp>
namespace boost
{
namespace math
{
// From <boost/math/quaternion.hpp> ----------------------------------------//
template < typename T >
class quaternion;
template < >
class quaternion< float >;
template < >
class quaternion< double >;
template < >
class quaternion< long double >;
// Also has many function templates (including operators)
// From <boost/math/octonion.hpp> ------------------------------------------//
template < typename T >
class octonion;
template < >
class octonion< float >;
template < >
class octonion< double >;
template < >
class octonion< long double >;
// Also has many function templates (including operators)
// From <boost/math/special_functions/acosh.hpp> ---------------------------//
// Only has function template
// From <boost/math/special_functions/asinh.hpp> ---------------------------//
// Only has function template
// From <boost/math/special_functions/atanh.hpp> ---------------------------//
// Only has function template
// From <boost/math/special_functions/sinc.hpp> ----------------------------//
// Only has function templates
// From <boost/math/special_functions/sinhc.hpp> ---------------------------//
// Only has function templates
// From <boost/math/common_factor.hpp> -------------------------------------//
// Only #includes other headers
// From <boost/math/common_factor_ct.hpp> ----------------------------------//
#ifdef BOOST_NO_INTEGRAL_INT64_T
typedef unsigned long static_gcd_type;
#else
typedef boost::uintmax_t static_gcd_type;
#endif
template < static_gcd_type Value1, static_gcd_type Value2 >
struct static_gcd;
template < static_gcd_type Value1, static_gcd_type Value2 >
struct static_lcm;
// From <boost/math/common_factor_rt.hpp> ----------------------------------//
template < typename IntegerType >
class gcd_evaluator;
template < typename IntegerType >
class lcm_evaluator;
// Also has a couple of function templates
} // namespace math
} // namespace boost
#endif // BOOST_MATH_FWD_HPP

View File

@ -0,0 +1,266 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker
// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_MOVE_ADL_MOVE_SWAP_HPP
#define BOOST_MOVE_ADL_MOVE_SWAP_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
//Based on Boost.Core's swap.
//Many thanks to Steven Watanabe, Joseph Gauterin and Niels Dekker.
#include <cstddef> //for std::size_t
#include <boost/move/detail/workaround.hpp> //forceinline
//Try to avoid including <algorithm>, as it's quite big
#if defined(_MSC_VER) && defined(BOOST_DINKUMWARE_STDLIB)
#include <utility> //Dinkum libraries define std::swap in utility which is lighter than algorithm
#elif defined(BOOST_GNU_STDLIB)
//For non-GCC compilers, where GNUC version is not very reliable, or old GCC versions
//use the good old stl_algobase header, which is quite lightweight
#if !defined(BOOST_GCC) || ((__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 3)))
#include <bits/stl_algobase.h>
#elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
//In GCC 4.3 a tiny stl_move.h was created with swap and move utilities
#include <bits/stl_move.h>
#else
//In GCC 4.4 stl_move.h was renamed to move.h
#include <bits/move.h>
#endif
#elif defined(_LIBCPP_VERSION)
#include <type_traits> //The initial import of libc++ defines std::swap and still there
#elif __cplusplus >= 201103L
#include <utility> //Fallback for C++ >= 2011
#else
#include <algorithm> //Fallback for C++98/03
#endif
#include <boost/move/utility_core.hpp> //for boost::move
#if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
namespace boost_move_member_swap {
struct dont_care
{
dont_care(...);
};
struct private_type
{
static private_type p;
private_type const &operator,(int) const;
};
typedef char yes_type;
struct no_type{ char dummy[2]; };
template<typename T>
no_type is_private_type(T const &);
yes_type is_private_type(private_type const &);
template <typename Type>
class has_member_function_named_swap
{
struct BaseMixin
{
void swap();
};
struct Base : public Type, public BaseMixin { Base(); };
template <typename T, T t> class Helper{};
template <typename U>
static no_type deduce(U*, Helper<void (BaseMixin::*)(), &U::swap>* = 0);
static yes_type deduce(...);
public:
static const bool value = sizeof(yes_type) == sizeof(deduce((Base*)(0)));
};
template<typename Fun, bool HasFunc>
struct has_member_swap_impl
{
static const bool value = false;
};
template<typename Fun>
struct has_member_swap_impl<Fun, true>
{
struct FunWrap : Fun
{
FunWrap();
using Fun::swap;
private_type swap(dont_care) const;
};
static Fun &declval_fun();
static FunWrap declval_wrap();
static bool const value =
sizeof(no_type) == sizeof(is_private_type( (declval_wrap().swap(declval_fun()), 0)) );
};
template<typename Fun>
struct has_member_swap : public has_member_swap_impl
<Fun, has_member_function_named_swap<Fun>::value>
{};
} //namespace boost_move_member_swap
namespace boost_move_adl_swap{
template<class P1, class P2, bool = P1::value>
struct and_op_impl
{ static const bool value = false; };
template<class P1, class P2>
struct and_op_impl<P1, P2, true>
{ static const bool value = P2::value; };
template<class P1, class P2>
struct and_op
: and_op_impl<P1, P2>
{};
//////
template<class P1, class P2, bool = P1::value>
struct and_op_not_impl
{ static const bool value = false; };
template<class P1, class P2>
struct and_op_not_impl<P1, P2, true>
{ static const bool value = !P2::value; };
template<class P1, class P2>
struct and_op_not
: and_op_not_impl<P1, P2>
{};
template<class T>
BOOST_MOVE_FORCEINLINE void swap_proxy(T& x, T& y, typename boost::move_detail::enable_if_c<!boost::move_detail::has_move_emulation_enabled_impl<T>::value>::type* = 0)
{
//use std::swap if argument dependent lookup fails
//Use using directive ("using namespace xxx;") instead as some older compilers
//don't do ADL with using declarations ("using ns::func;").
using namespace std;
swap(x, y);
}
template<class T>
BOOST_MOVE_FORCEINLINE void swap_proxy(T& x, T& y
, typename boost::move_detail::enable_if< and_op_not_impl<boost::move_detail::has_move_emulation_enabled_impl<T>
, boost_move_member_swap::has_member_swap<T> >
>::type* = 0)
{ T t(::boost::move(x)); x = ::boost::move(y); y = ::boost::move(t); }
template<class T>
BOOST_MOVE_FORCEINLINE void swap_proxy(T& x, T& y
, typename boost::move_detail::enable_if< and_op_impl< boost::move_detail::has_move_emulation_enabled_impl<T>
, boost_move_member_swap::has_member_swap<T> >
>::type* = 0)
{ x.swap(y); }
} //namespace boost_move_adl_swap{
#else
namespace boost_move_adl_swap{
template<class T>
BOOST_MOVE_FORCEINLINE void swap_proxy(T& x, T& y)
{
using std::swap;
swap(x, y);
}
} //namespace boost_move_adl_swap{
#endif //#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
namespace boost_move_adl_swap{
template<class T, std::size_t N>
void swap_proxy(T (& x)[N], T (& y)[N])
{
for (std::size_t i = 0; i < N; ++i){
::boost_move_adl_swap::swap_proxy(x[i], y[i]);
}
}
} //namespace boost_move_adl_swap {
#endif //!defined(BOOST_MOVE_DOXYGEN_INVOKED)
namespace boost{
//! Exchanges the values of a and b, using Argument Dependent Lookup (ADL) to select a
//! specialized swap function if available. If no specialized swap function is available,
//! std::swap is used.
//!
//! <b>Exception</b>: If T uses Boost.Move's move emulation and the compiler has
//! no rvalue references then:
//!
//! - If T has a <code>T::swap(T&)</code> member, that member is called.
//! - Otherwise a move-based swap is called, equivalent to:
//! <code>T t(::boost::move(x)); x = ::boost::move(y); y = ::boost::move(t);</code>.
template<class T>
BOOST_MOVE_FORCEINLINE void adl_move_swap(T& x, T& y)
{
::boost_move_adl_swap::swap_proxy(x, y);
}
//! Exchanges elements between range [first1, last1) and another range starting at first2
//! using boost::adl_move_swap.
//!
//! Parameters:
//! first1, last1 - the first range of elements to swap
//! first2 - beginning of the second range of elements to swap
//!
//! Type requirements:
//! - ForwardIt1, ForwardIt2 must meet the requirements of ForwardIterator.
//! - The types of dereferenced ForwardIt1 and ForwardIt2 must meet the
//! requirements of Swappable
//!
//! Return value: Iterator to the element past the last element exchanged in the range
//! beginning with first2.
template<class ForwardIt1, class ForwardIt2>
ForwardIt2 adl_move_swap_ranges(ForwardIt1 first1, ForwardIt1 last1, ForwardIt2 first2)
{
while (first1 != last1) {
::boost::adl_move_swap(*first1, *first2);
++first1;
++first2;
}
return first2;
}
template<class BidirIt1, class BidirIt2>
BidirIt2 adl_move_swap_ranges_backward(BidirIt1 first1, BidirIt1 last1, BidirIt2 last2)
{
while (first1 != last1) {
::boost::adl_move_swap(*(--last1), *(--last2));
}
return last2;
}
} //namespace boost{
#endif //#ifndef BOOST_MOVE_ADL_MOVE_SWAP_HPP

155
3rdparty/boost/boost/move/algo/move.hpp vendored Normal file
View File

@ -0,0 +1,155 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2012-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)
//
// See http://www.boost.org/libs/move for documentation.
//
//////////////////////////////////////////////////////////////////////////////
//! \file
#ifndef BOOST_MOVE_ALGO_MOVE_HPP
#define BOOST_MOVE_ALGO_MOVE_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#include <boost/move/detail/config_begin.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/move/detail/iterator_traits.hpp>
#include <boost/detail/no_exceptions_support.hpp>
namespace boost {
//////////////////////////////////////////////////////////////////////////////
//
// move
//
//////////////////////////////////////////////////////////////////////////////
#if !defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
//! <b>Effects</b>: Moves elements in the range [first,last) into the range [result,result + (last -
//! first)) starting from first and proceeding to last. For each non-negative integer n < (last-first),
//! performs *(result + n) = ::boost::move (*(first + n)).
//!
//! <b>Effects</b>: result + (last - first).
//!
//! <b>Requires</b>: result shall not be in the range [first,last).
//!
//! <b>Complexity</b>: Exactly last - first move assignments.
template <typename I, // I models InputIterator
typename O> // O models OutputIterator
O move(I f, I l, O result)
{
while (f != l) {
*result = ::boost::move(*f);
++f; ++result;
}
return result;
}
//////////////////////////////////////////////////////////////////////////////
//
// move_backward
//
//////////////////////////////////////////////////////////////////////////////
//! <b>Effects</b>: Moves elements in the range [first,last) into the range
//! [result - (last-first),result) starting from last - 1 and proceeding to
//! first. For each positive integer n <= (last - first),
//! performs *(result - n) = ::boost::move(*(last - n)).
//!
//! <b>Requires</b>: result shall not be in the range [first,last).
//!
//! <b>Returns</b>: result - (last - first).
//!
//! <b>Complexity</b>: Exactly last - first assignments.
template <typename I, // I models BidirectionalIterator
typename O> // O models BidirectionalIterator
O move_backward(I f, I l, O result)
{
while (f != l) {
--l; --result;
*result = ::boost::move(*l);
}
return result;
}
#else
using ::std::move_backward;
#endif //!defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
//////////////////////////////////////////////////////////////////////////////
//
// uninitialized_move
//
//////////////////////////////////////////////////////////////////////////////
//! <b>Effects</b>:
//! \code
//! for (; first != last; ++result, ++first)
//! new (static_cast<void*>(&*result))
//! typename iterator_traits<ForwardIterator>::value_type(boost::move(*first));
//! \endcode
//!
//! <b>Returns</b>: result
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
F uninitialized_move(I f, I l, F r
/// @cond
// ,typename ::boost::move_detail::enable_if<has_move_emulation_enabled<typename boost::movelib::iterator_traits<I>::value_type> >::type* = 0
/// @endcond
)
{
typedef typename boost::movelib::iterator_traits<I>::value_type input_value_type;
F back = r;
BOOST_TRY{
while (f != l) {
void * const addr = static_cast<void*>(::boost::move_detail::addressof(*r));
::new(addr) input_value_type(::boost::move(*f));
++f; ++r;
}
}
BOOST_CATCH(...){
for (; back != r; ++back){
back->~input_value_type();
}
BOOST_RETHROW;
}
BOOST_CATCH_END
return r;
}
/// @cond
/*
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
F uninitialized_move(I f, I l, F r,
typename ::boost::move_detail::disable_if<has_move_emulation_enabled<typename boost::movelib::iterator_traits<I>::value_type> >::type* = 0)
{
return std::uninitialized_copy(f, l, r);
}
*/
/// @endcond
} //namespace boost {
#include <boost/move/detail/config_end.hpp>
#endif //#ifndef BOOST_MOVE_ALGO_MOVE_HPP

167
3rdparty/boost/boost/move/algorithm.hpp vendored Normal file
View File

@ -0,0 +1,167 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2012-2012.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/move for documentation.
//
//////////////////////////////////////////////////////////////////////////////
//! \file
#ifndef BOOST_MOVE_ALGORITHM_HPP
#define BOOST_MOVE_ALGORITHM_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#include <boost/move/detail/config_begin.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/move/iterator.hpp>
#include <boost/move/algo/move.hpp>
#include <boost/detail/no_exceptions_support.hpp>
#include <algorithm> //copy, copy_backward
#include <memory> //uninitialized_copy
namespace boost {
//////////////////////////////////////////////////////////////////////////////
//
// uninitialized_copy_or_move
//
//////////////////////////////////////////////////////////////////////////////
namespace move_detail {
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
inline F uninitialized_move_move_iterator(I f, I l, F r
// ,typename ::boost::move_detail::enable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0
)
{
return ::boost::uninitialized_move(f, l, r);
}
/*
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
F uninitialized_move_move_iterator(I f, I l, F r,
typename ::boost::move_detail::disable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0)
{
return std::uninitialized_copy(f.base(), l.base(), r);
}
*/
} //namespace move_detail {
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
inline F uninitialized_copy_or_move(I f, I l, F r,
typename ::boost::move_detail::enable_if< move_detail::is_move_iterator<I> >::type* = 0)
{
return ::boost::move_detail::uninitialized_move_move_iterator(f, l, r);
}
//////////////////////////////////////////////////////////////////////////////
//
// copy_or_move
//
//////////////////////////////////////////////////////////////////////////////
namespace move_detail {
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
inline F move_move_iterator(I f, I l, F r
// ,typename ::boost::move_detail::enable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0
)
{
return ::boost::move(f, l, r);
}
/*
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
F move_move_iterator(I f, I l, F r,
typename ::boost::move_detail::disable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0)
{
return std::copy(f.base(), l.base(), r);
}
*/
} //namespace move_detail {
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
inline F copy_or_move(I f, I l, F r,
typename ::boost::move_detail::enable_if< move_detail::is_move_iterator<I> >::type* = 0)
{
return ::boost::move_detail::move_move_iterator(f, l, r);
}
/// @endcond
//! <b>Effects</b>:
//! \code
//! for (; first != last; ++result, ++first)
//! new (static_cast<void*>(&*result))
//! typename iterator_traits<ForwardIterator>::value_type(*first);
//! \endcode
//!
//! <b>Returns</b>: result
//!
//! <b>Note</b>: This function is provided because
//! <i>std::uninitialized_copy</i> from some STL implementations
//! is not compatible with <i>move_iterator</i>
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
inline F uninitialized_copy_or_move(I f, I l, F r
/// @cond
,typename ::boost::move_detail::disable_if< move_detail::is_move_iterator<I> >::type* = 0
/// @endcond
)
{
return std::uninitialized_copy(f, l, r);
}
//! <b>Effects</b>:
//! \code
//! for (; first != last; ++result, ++first)
//! *result = *first;
//! \endcode
//!
//! <b>Returns</b>: result
//!
//! <b>Note</b>: This function is provided because
//! <i>std::uninitialized_copy</i> from some STL implementations
//! is not compatible with <i>move_iterator</i>
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
inline F copy_or_move(I f, I l, F r
/// @cond
,typename ::boost::move_detail::disable_if< move_detail::is_move_iterator<I> >::type* = 0
/// @endcond
)
{
return std::copy(f, l, r);
}
} //namespace boost {
#include <boost/move/detail/config_end.hpp>
#endif //#ifndef BOOST_MOVE_ALGORITHM_HPP

View File

@ -0,0 +1,77 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2014-2014.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/move for documentation.
//
//////////////////////////////////////////////////////////////////////////////
//! \file
#ifndef BOOST_MOVE_DETAIL_ITERATOR_TRAITS_HPP
#define BOOST_MOVE_DETAIL_ITERATOR_TRAITS_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#include <cstddef>
#include <boost/move/detail/type_traits.hpp>
#include <boost/move/detail/std_ns_begin.hpp>
BOOST_MOVE_STD_NS_BEG
struct input_iterator_tag;
struct forward_iterator_tag;
struct bidirectional_iterator_tag;
struct random_access_iterator_tag;
struct output_iterator_tag;
BOOST_MOVE_STD_NS_END
#include <boost/move/detail/std_ns_end.hpp>
namespace boost{ namespace movelib{
template<class Iterator>
struct iterator_traits
{
typedef typename Iterator::difference_type difference_type;
typedef typename Iterator::value_type value_type;
typedef typename Iterator::pointer pointer;
typedef typename Iterator::reference reference;
typedef typename Iterator::iterator_category iterator_category;
typedef typename boost::move_detail::make_unsigned<difference_type>::type size_type;
};
template<class T>
struct iterator_traits<T*>
{
typedef std::ptrdiff_t difference_type;
typedef T value_type;
typedef T* pointer;
typedef T& reference;
typedef std::random_access_iterator_tag iterator_category;
typedef typename boost::move_detail::make_unsigned<difference_type>::type size_type;
};
template<class T>
struct iterator_traits<const T*>
{
typedef std::ptrdiff_t difference_type;
typedef T value_type;
typedef const T* pointer;
typedef const T& reference;
typedef std::random_access_iterator_tag iterator_category;
typedef typename boost::move_detail::make_unsigned<difference_type>::type size_type;
};
}} //namespace boost { namespace movelib{
#endif //#ifndef BOOST_MOVE_DETAIL_ITERATOR_TRAITS_HPP

311
3rdparty/boost/boost/move/iterator.hpp vendored Normal file
View File

@ -0,0 +1,311 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2012-2012.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/move for documentation.
//
//////////////////////////////////////////////////////////////////////////////
//! \file
#ifndef BOOST_MOVE_ITERATOR_HPP
#define BOOST_MOVE_ITERATOR_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#include <boost/move/detail/config_begin.hpp>
#include <boost/move/detail/workaround.hpp> //forceinline
#include <boost/move/detail/iterator_traits.hpp>
#include <boost/move/utility_core.hpp>
namespace boost {
//////////////////////////////////////////////////////////////////////////////
//
// move_iterator
//
//////////////////////////////////////////////////////////////////////////////
//! Class template move_iterator is an iterator adaptor with the same behavior
//! as the underlying iterator except that its dereference operator implicitly
//! converts the value returned by the underlying iterator's dereference operator
//! to an rvalue reference. Some generic algorithms can be called with move
//! iterators to replace copying with moving.
template <class It>
class move_iterator
{
public:
typedef It iterator_type;
typedef typename boost::movelib::iterator_traits<iterator_type>::value_type value_type;
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_DOXYGEN_INVOKED)
typedef value_type && reference;
#else
typedef typename ::boost::move_detail::if_
< ::boost::has_move_emulation_enabled<value_type>
, ::boost::rv<value_type>&
, value_type & >::type reference;
#endif
typedef It pointer;
typedef typename boost::movelib::iterator_traits<iterator_type>::difference_type difference_type;
typedef typename boost::movelib::iterator_traits<iterator_type>::iterator_category iterator_category;
BOOST_MOVE_FORCEINLINE move_iterator()
: m_it()
{}
BOOST_MOVE_FORCEINLINE explicit move_iterator(const It &i)
: m_it(i)
{}
template <class U>
BOOST_MOVE_FORCEINLINE move_iterator(const move_iterator<U>& u)
: m_it(u.m_it)
{}
BOOST_MOVE_FORCEINLINE reference operator*() const
{
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES)
return *m_it;
#else
return ::boost::move(*m_it);
#endif
}
BOOST_MOVE_FORCEINLINE pointer operator->() const
{ return m_it; }
BOOST_MOVE_FORCEINLINE move_iterator& operator++()
{ ++m_it; return *this; }
BOOST_MOVE_FORCEINLINE move_iterator<iterator_type> operator++(int)
{ move_iterator<iterator_type> tmp(*this); ++(*this); return tmp; }
BOOST_MOVE_FORCEINLINE move_iterator& operator--()
{ --m_it; return *this; }
BOOST_MOVE_FORCEINLINE move_iterator<iterator_type> operator--(int)
{ move_iterator<iterator_type> tmp(*this); --(*this); return tmp; }
move_iterator<iterator_type> operator+ (difference_type n) const
{ return move_iterator<iterator_type>(m_it + n); }
BOOST_MOVE_FORCEINLINE move_iterator& operator+=(difference_type n)
{ m_it += n; return *this; }
BOOST_MOVE_FORCEINLINE move_iterator<iterator_type> operator- (difference_type n) const
{ return move_iterator<iterator_type>(m_it - n); }
BOOST_MOVE_FORCEINLINE move_iterator& operator-=(difference_type n)
{ m_it -= n; return *this; }
BOOST_MOVE_FORCEINLINE reference operator[](difference_type n) const
{
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES)
return m_it[n];
#else
return ::boost::move(m_it[n]);
#endif
}
BOOST_MOVE_FORCEINLINE friend bool operator==(const move_iterator& x, const move_iterator& y)
{ return x.m_it == y.m_it; }
BOOST_MOVE_FORCEINLINE friend bool operator!=(const move_iterator& x, const move_iterator& y)
{ return x.m_it != y.m_it; }
BOOST_MOVE_FORCEINLINE friend bool operator< (const move_iterator& x, const move_iterator& y)
{ return x.m_it < y.m_it; }
BOOST_MOVE_FORCEINLINE friend bool operator<=(const move_iterator& x, const move_iterator& y)
{ return x.m_it <= y.m_it; }
BOOST_MOVE_FORCEINLINE friend bool operator> (const move_iterator& x, const move_iterator& y)
{ return x.m_it > y.m_it; }
BOOST_MOVE_FORCEINLINE friend bool operator>=(const move_iterator& x, const move_iterator& y)
{ return x.m_it >= y.m_it; }
BOOST_MOVE_FORCEINLINE friend difference_type operator-(const move_iterator& x, const move_iterator& y)
{ return x.m_it - y.m_it; }
BOOST_MOVE_FORCEINLINE friend move_iterator operator+(difference_type n, const move_iterator& x)
{ return move_iterator(x.m_it + n); }
private:
It m_it;
};
//is_move_iterator
namespace move_detail {
template <class I>
struct is_move_iterator
{
static const bool value = false;
};
template <class I>
struct is_move_iterator< ::boost::move_iterator<I> >
{
static const bool value = true;
};
} //namespace move_detail {
//////////////////////////////////////////////////////////////////////////////
//
// move_iterator
//
//////////////////////////////////////////////////////////////////////////////
//!
//! <b>Returns</b>: move_iterator<It>(i).
template<class It>
inline move_iterator<It> make_move_iterator(const It &it)
{ return move_iterator<It>(it); }
//////////////////////////////////////////////////////////////////////////////
//
// back_move_insert_iterator
//
//////////////////////////////////////////////////////////////////////////////
//! A move insert iterator that move constructs elements at the
//! back of a container
template <typename C> // C models Container
class back_move_insert_iterator
{
C* container_m;
public:
typedef C container_type;
typedef typename C::value_type value_type;
typedef typename C::reference reference;
typedef typename C::pointer pointer;
typedef typename C::difference_type difference_type;
typedef std::output_iterator_tag iterator_category;
explicit back_move_insert_iterator(C& x) : container_m(&x) { }
back_move_insert_iterator& operator=(reference x)
{ container_m->push_back(boost::move(x)); return *this; }
back_move_insert_iterator& operator=(BOOST_RV_REF(value_type) x)
{ reference rx = x; return this->operator=(rx); }
back_move_insert_iterator& operator*() { return *this; }
back_move_insert_iterator& operator++() { return *this; }
back_move_insert_iterator& operator++(int) { return *this; }
};
//!
//! <b>Returns</b>: back_move_insert_iterator<C>(x).
template <typename C> // C models Container
inline back_move_insert_iterator<C> back_move_inserter(C& x)
{
return back_move_insert_iterator<C>(x);
}
//////////////////////////////////////////////////////////////////////////////
//
// front_move_insert_iterator
//
//////////////////////////////////////////////////////////////////////////////
//! A move insert iterator that move constructs elements int the
//! front of a container
template <typename C> // C models Container
class front_move_insert_iterator
{
C* container_m;
public:
typedef C container_type;
typedef typename C::value_type value_type;
typedef typename C::reference reference;
typedef typename C::pointer pointer;
typedef typename C::difference_type difference_type;
typedef std::output_iterator_tag iterator_category;
explicit front_move_insert_iterator(C& x) : container_m(&x) { }
front_move_insert_iterator& operator=(reference x)
{ container_m->push_front(boost::move(x)); return *this; }
front_move_insert_iterator& operator=(BOOST_RV_REF(value_type) x)
{ reference rx = x; return this->operator=(rx); }
front_move_insert_iterator& operator*() { return *this; }
front_move_insert_iterator& operator++() { return *this; }
front_move_insert_iterator& operator++(int) { return *this; }
};
//!
//! <b>Returns</b>: front_move_insert_iterator<C>(x).
template <typename C> // C models Container
inline front_move_insert_iterator<C> front_move_inserter(C& x)
{
return front_move_insert_iterator<C>(x);
}
//////////////////////////////////////////////////////////////////////////////
//
// insert_move_iterator
//
//////////////////////////////////////////////////////////////////////////////
template <typename C> // C models Container
class move_insert_iterator
{
C* container_m;
typename C::iterator pos_;
public:
typedef C container_type;
typedef typename C::value_type value_type;
typedef typename C::reference reference;
typedef typename C::pointer pointer;
typedef typename C::difference_type difference_type;
typedef std::output_iterator_tag iterator_category;
explicit move_insert_iterator(C& x, typename C::iterator pos)
: container_m(&x), pos_(pos)
{}
move_insert_iterator& operator=(reference x)
{
pos_ = container_m->insert(pos_, ::boost::move(x));
++pos_;
return *this;
}
move_insert_iterator& operator=(BOOST_RV_REF(value_type) x)
{ reference rx = x; return this->operator=(rx); }
move_insert_iterator& operator*() { return *this; }
move_insert_iterator& operator++() { return *this; }
move_insert_iterator& operator++(int) { return *this; }
};
//!
//! <b>Returns</b>: move_insert_iterator<C>(x, it).
template <typename C> // C models Container
inline move_insert_iterator<C> move_inserter(C& x, typename C::iterator it)
{
return move_insert_iterator<C>(x, it);
}
} //namespace boost {
#include <boost/move/detail/config_end.hpp>
#endif //#ifndef BOOST_MOVE_ITERATOR_HPP

35
3rdparty/boost/boost/move/move.hpp vendored Normal file
View File

@ -0,0 +1,35 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright David Abrahams, Vicente Botet 2009.
// (C) Copyright Ion Gaztanaga 2009-2012.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/move for documentation.
//
//////////////////////////////////////////////////////////////////////////////
//! \file
//! A general library header that includes
//! the rest of top-level headers.
#ifndef BOOST_MOVE_MOVE_HPP
#define BOOST_MOVE_MOVE_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#include <boost/move/detail/config_begin.hpp>
#include <boost/move/utility.hpp>
#include <boost/move/iterator.hpp>
#include <boost/move/traits.hpp>
#include <boost/move/algorithm.hpp>
#include <boost/move/detail/config_end.hpp>
#endif //#ifndef BOOST_MOVE_MOVE_HPP

View File

@ -0,0 +1,34 @@
#ifndef BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/aux_/config/gcc.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#if !defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING) \
&& ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|| BOOST_WORKAROUND(__EDG_VERSION__, <= 245) \
|| BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, <= 0x0295) \
|| BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \
|| BOOST_WORKAROUND(__NVCC__, BOOST_TESTED_AT(1)) \
)
# define BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING
#endif
#endif // BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED

View File

@ -0,0 +1,43 @@
#ifndef BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED
#define BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/empty_fwd.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace mpl {
// default implementation; conrete sequences might override it by
// specializing either the 'empty_impl' or the primary 'empty' template
template< typename Tag >
struct empty_impl
{
template< typename Sequence > struct apply
: is_same<
typename begin<Sequence>::type
, typename end<Sequence>::type
>
{
};
};
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,empty_impl)
}}
#endif // BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,41 @@
#ifndef BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED
#define BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/front_fwd.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
namespace boost { namespace mpl {
// default implementation; conrete sequences might override it by
// specializing either the 'front_impl' or the primary 'front' template
template< typename Tag >
struct front_impl
{
template< typename Sequence > struct apply
{
typedef typename begin<Sequence>::type iter_;
typedef typename deref<iter_>::type type;
};
};
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,front_impl)
}}
#endif // BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,34 @@
#ifndef BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED
#define BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2002-2004
// Copyright David Abrahams 2003
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/has_key_fwd.hpp>
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
namespace boost { namespace mpl {
// no default implementation; the definition is needed to make MSVC happy
template< typename Tag > struct has_key_impl
{
template< typename AssociativeSequence, typename Key > struct apply;
};
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,has_key_impl)
}}
#endif // BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,68 @@
#ifndef BOOST_MPL_INSERT_IMPL_HPP_INCLUDED
#define BOOST_MPL_INSERT_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/reverse_fold.hpp>
#include <boost/mpl/iterator_range.hpp>
#include <boost/mpl/clear.hpp>
#include <boost/mpl/push_front.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace mpl {
// default implementation; conrete sequences might override it by
// specializing either the 'insert_impl' or the primary 'insert' template
template< typename Tag >
struct insert_impl
{
template<
typename Sequence
, typename Pos
, typename T
>
struct apply
{
typedef iterator_range<
typename begin<Sequence>::type
, Pos
> first_half_;
typedef iterator_range<
Pos
, typename end<Sequence>::type
> second_half_;
typedef typename reverse_fold<
second_half_
, typename clear<Sequence>::type
, push_front<_,_>
>::type half_sequence_;
typedef typename reverse_fold<
first_half_
, typename push_front<half_sequence_,T>::type
, push_front<_,_>
>::type type;
};
};
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_impl)
}}
#endif // BOOST_MPL_INSERT_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,48 @@
#ifndef BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED
#define BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/aux_/ptr_to_ref.hpp>
#include <boost/mpl/aux_/config/operators.hpp>
#if defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING)
# include <boost/mpl/aux_/static_cast.hpp>
# define BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY operator/
# define BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER operator|
# define BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY operator||
# define BOOST_MPL_AUX_OVERLOAD_IS_MASKED operator%
# define BOOST_MPL_AUX_OVERLOAD_CALL_VALUE_BY_KEY(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) / x
# define BOOST_MPL_AUX_OVERLOAD_CALL_ITEM_BY_ORDER(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) | x
# define BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) || x
# define BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) % x
#else
# define BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY value_by_key_
# define BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER item_by_order_
# define BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY order_by_key_
# define BOOST_MPL_AUX_OVERLOAD_IS_MASKED is_masked_
# define BOOST_MPL_AUX_OVERLOAD_CALL_VALUE_BY_KEY(T, x) T::BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY( BOOST_MPL_AUX_PTR_TO_REF(T), x )
# define BOOST_MPL_AUX_OVERLOAD_CALL_ITEM_BY_ORDER(T, x) T::BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER( BOOST_MPL_AUX_PTR_TO_REF(T), x )
# define BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(T, x) T::BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY( BOOST_MPL_AUX_PTR_TO_REF(T), x )
# define BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(T, x) T::BOOST_MPL_AUX_OVERLOAD_IS_MASKED( BOOST_MPL_AUX_PTR_TO_REF(T), x )
#endif
#endif // BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED

View File

@ -0,0 +1,46 @@
#ifndef BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED
#define BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/aux_/static_cast.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
|| ( BOOST_WORKAROUND(__EDG_VERSION__, <= 245) \
&& !(defined(__STD_STRICT_ANSI) \
|| defined(__STD_STRICT_ANSI_ERRORS)) )
# define BOOST_MPL_AUX_PTR_TO_REF(X) \
*BOOST_MPL_AUX_STATIC_CAST(X*, 0) \
/**/
#else
# define BOOST_MPL_AUX_PTR_TO_REF(X) \
aux::ptr_to_ref(BOOST_MPL_AUX_STATIC_CAST(X*, 0)) \
/**/
#endif
namespace boost { namespace mpl { namespace aux {
template< typename T > static T const& ptr_to_ref(T*);
}}}
#endif // BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED

35
3rdparty/boost/boost/mpl/base.hpp vendored Normal file
View File

@ -0,0 +1,35 @@
#ifndef BOOST_MPL_BASE_HPP_INCLUDED
#define BOOST_MPL_BASE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct base
{
typedef typename T::base type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,base,(T))
};
BOOST_MPL_AUX_NA_SPEC(1, base)
}}
#endif // BOOST_MPL_BASE_HPP_INCLUDED

19
3rdparty/boost/boost/mpl/begin.hpp vendored Normal file
View File

@ -0,0 +1,19 @@
#ifndef BOOST_MPL_BEGIN_HPP_INCLUDED
#define BOOST_MPL_BEGIN_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/begin_end.hpp>
#endif // BOOST_MPL_BEGIN_HPP_INCLUDED

39
3rdparty/boost/boost/mpl/empty.hpp vendored Normal file
View File

@ -0,0 +1,39 @@
#ifndef BOOST_MPL_EMPTY_HPP_INCLUDED
#define BOOST_MPL_EMPTY_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/empty_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/empty_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
>
struct empty
: empty_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,empty,(Sequence))
};
BOOST_MPL_AUX_NA_SPEC(1, empty)
}}
#endif // BOOST_MPL_EMPTY_HPP_INCLUDED

19
3rdparty/boost/boost/mpl/end.hpp vendored Normal file
View File

@ -0,0 +1,19 @@
#ifndef BOOST_MPL_END_HPP_INCLUDED
#define BOOST_MPL_END_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/begin_end.hpp>
#endif // BOOST_MPL_END_HPP_INCLUDED

24
3rdparty/boost/boost/mpl/erase_fwd.hpp vendored Normal file
View File

@ -0,0 +1,24 @@
#ifndef BOOST_MPL_ERASE_FWD_HPP_INCLUDED
#define BOOST_MPL_ERASE_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
namespace boost { namespace mpl {
template< typename Tag > struct erase_impl;
template< typename Sequence, typename First, typename Last > struct erase;
}}
#endif // BOOST_MPL_ERASE_FWD_HPP_INCLUDED

View File

@ -0,0 +1,24 @@
#ifndef BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED
#define BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
namespace boost { namespace mpl {
template< typename Tag > struct erase_key_impl;
template< typename Sequence, typename Key > struct erase_key;
}}
#endif // BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED

39
3rdparty/boost/boost/mpl/front.hpp vendored Normal file
View File

@ -0,0 +1,39 @@
#ifndef BOOST_MPL_FRONT_HPP_INCLUDED
#define BOOST_MPL_FRONT_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/front_fwd.hpp>
#include <boost/mpl/aux_/front_impl.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
>
struct front
: front_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,front,(Sequence))
};
BOOST_MPL_AUX_NA_SPEC(1, front)
}}
#endif // BOOST_MPL_FRONT_HPP_INCLUDED

41
3rdparty/boost/boost/mpl/has_key.hpp vendored Normal file
View File

@ -0,0 +1,41 @@
#ifndef BOOST_MPL_HAS_KEY_HPP_INCLUDED
#define BOOST_MPL_HAS_KEY_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/has_key_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/has_key_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence)
, typename BOOST_MPL_AUX_NA_PARAM(Key)
>
struct has_key
: has_key_impl< typename sequence_tag<AssociativeSequence>::type >
::template apply<AssociativeSequence,Key>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,has_key,(AssociativeSequence,Key))
};
BOOST_MPL_AUX_NA_SPEC(2, has_key)
}}
#endif // BOOST_MPL_HAS_KEY_HPP_INCLUDED

View File

@ -0,0 +1,25 @@
#ifndef BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED
#define BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
namespace boost { namespace mpl {
template< typename Tag > struct has_key_impl;
template< typename AssociativeSequence, typename Key > struct has_key;
}}
#endif // BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED

41
3rdparty/boost/boost/mpl/insert.hpp vendored Normal file
View File

@ -0,0 +1,41 @@
#ifndef BOOST_MPL_INSERT_HPP_INCLUDED
#define BOOST_MPL_INSERT_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/insert_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/insert_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(Pos_or_T)
, typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct insert
: insert_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence,Pos_or_T,T >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert,(Sequence,Pos_or_T,T))
};
BOOST_MPL_AUX_NA_SPEC(3, insert)
}}
#endif // BOOST_MPL_INSERT_HPP_INCLUDED

24
3rdparty/boost/boost/mpl/insert_fwd.hpp vendored Normal file
View File

@ -0,0 +1,24 @@
#ifndef BOOST_MPL_INSERT_FWD_HPP_INCLUDED
#define BOOST_MPL_INSERT_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
namespace boost { namespace mpl {
template< typename Tag > struct insert_impl;
template< typename Sequence, typename Pos_or_T, typename T > struct insert;
}}
#endif // BOOST_MPL_INSERT_FWD_HPP_INCLUDED

View File

@ -0,0 +1,24 @@
#ifndef BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED
#define BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
namespace boost { namespace mpl {
template< typename Tag > struct insert_range_impl;
template< typename Sequence, typename Pos, typename Range > struct insert_range;
}}
#endif // BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED

112
3rdparty/boost/boost/mpl/is_sequence.hpp vendored Normal file
View File

@ -0,0 +1,112 @@
#ifndef BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
#define BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2002-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/not.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/sequence_tag_fwd.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/void.hpp>
#include <boost/mpl/aux_/has_tag.hpp>
#include <boost/mpl/aux_/has_begin.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/eti.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
# include <boost/mpl/aux_/msvc_is_class.hpp>
#elif BOOST_WORKAROUND(BOOST_MSVC, == 1300)
# include <boost/type_traits/is_class.hpp>
#endif
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace mpl {
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
namespace aux {
// agurt, 11/jun/03:
// MSVC 6.5/7.0 fails if 'has_begin' is instantiated on a class type that has a
// 'begin' member that doesn't name a type; e.g. 'has_begin< std::vector<int> >'
// would fail; requiring 'T' to have _both_ 'tag' and 'begin' members workarounds
// the issue for most real-world cases
template< typename T > struct is_sequence_impl
: and_<
identity< aux::has_tag<T> >
, identity< aux::has_begin<T> >
>
{
};
} // namespace aux
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct is_sequence
: if_<
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
aux::msvc_is_class<T>
#else
boost::is_class<T>
#endif
, aux::is_sequence_impl<T>
, bool_<false>
>::type
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
};
#elif defined(BOOST_MPL_CFG_NO_HAS_XXX)
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct is_sequence
: bool_<false>
{
};
#else
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct is_sequence
: not_< is_same< typename begin<T>::type, void_ > >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
};
#endif // BOOST_MSVC
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
template<> struct is_sequence<int>
: bool_<false>
{
};
#endif
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, is_sequence)
}}
#endif // BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED

View File

@ -0,0 +1,35 @@
#ifndef BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED
#define BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Iterator)
>
struct iterator_category
{
typedef typename Iterator::category type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,iterator_category,(Iterator))
};
BOOST_MPL_AUX_NA_SPEC(1, iterator_category)
}}
#endif // BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED

View File

@ -0,0 +1,25 @@
#ifndef BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED
#define BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
namespace boost { namespace mpl {
template< typename Tag > struct key_type_impl;
template< typename AssociativeSequence, typename T > struct key_type;
}}
#endif // BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED

View File

@ -0,0 +1,72 @@
#ifndef BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED
#define BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/less.hpp>
#include <boost/mpl/iter_fold.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/mpl/aux_/common_name_wknd.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
namespace boost { namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(max_element)
namespace aux {
template< typename Predicate >
struct select_max
{
template< typename OldIterator, typename Iterator >
struct apply
{
typedef typename apply2<
Predicate
, typename deref<OldIterator>::type
, typename deref<Iterator>::type
>::type condition_;
typedef typename if_<
condition_
, Iterator
, OldIterator
>::type type;
};
};
} // namespace aux
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename Predicate = less<_,_>
>
struct max_element
: iter_fold<
Sequence
, typename begin<Sequence>::type
, protect< aux::select_max<Predicate> >
>
{
};
BOOST_MPL_AUX_NA_SPEC(1, max_element)
}}
#endif // BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED

46
3rdparty/boost/boost/mpl/min_max.hpp vendored Normal file
View File

@ -0,0 +1,46 @@
#ifndef BOOST_MPL_MIN_MAX_HPP_INCLUDED
#define BOOST_MPL_MIN_MAX_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2008
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/less.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(N1)
, typename BOOST_MPL_AUX_NA_PARAM(N2)
>
struct min
: if_< less<N1,N2>,N1,N2 >
{
};
template<
typename BOOST_MPL_AUX_NA_PARAM(N1)
, typename BOOST_MPL_AUX_NA_PARAM(N2)
>
struct max
: if_< less<N1,N2>,N2,N1 >
{
};
BOOST_MPL_AUX_NA_SPEC(2, min)
BOOST_MPL_AUX_NA_SPEC(2, max)
}}
#endif // BOOST_MPL_MIN_MAX_HPP_INCLUDED

169
3rdparty/boost/boost/mpl/pair_view.hpp vendored Normal file
View File

@ -0,0 +1,169 @@
#ifndef BOOST_MPL_PAIR_VIEW_HPP_INCLUDED
#define BOOST_MPL_PAIR_VIEW_HPP_INCLUDED
// Copyright David Abrahams 2003-2004
// Copyright Aleksey Gurtovoy 2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/iterator_category.hpp>
#include <boost/mpl/advance.hpp>
#include <boost/mpl/distance.hpp>
#include <boost/mpl/next_prior.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/mpl/min_max.hpp>
#include <boost/mpl/pair.hpp>
#include <boost/mpl/iterator_tags.hpp>
#include <boost/mpl/aux_/config/ctps.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
namespace boost { namespace mpl {
namespace aux {
struct pair_iter_tag;
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename Iter1, typename Iter2, typename Category >
struct pair_iter;
template< typename Category > struct prior_pair_iter
{
template< typename Iter1, typename Iter2 > struct apply
{
typedef typename mpl::prior<Iter1>::type i1_;
typedef typename mpl::prior<Iter2>::type i2_;
typedef pair_iter<i1_,i2_,Category> type;
};
};
template<> struct prior_pair_iter<forward_iterator_tag>
{
template< typename Iter1, typename Iter2 > struct apply
{
typedef pair_iter<Iter1,Iter2,forward_iterator_tag> type;
};
};
#endif
}
template<
typename Iter1
, typename Iter2
, typename Category
>
struct pair_iter
{
typedef aux::pair_iter_tag tag;
typedef Category category;
typedef Iter1 first;
typedef Iter2 second;
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
typedef pair<
typename deref<Iter1>::type
, typename deref<Iter2>::type
> type;
typedef typename mpl::next<Iter1>::type i1_;
typedef typename mpl::next<Iter2>::type i2_;
typedef pair_iter<i1_,i2_,Category> next;
typedef apply_wrap2< aux::prior_pair_iter<Category>,Iter1,Iter2 >::type prior;
#endif
};
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename Iter1, typename Iter2, typename C >
struct deref< pair_iter<Iter1,Iter2,C> >
{
typedef pair<
typename deref<Iter1>::type
, typename deref<Iter2>::type
> type;
};
template< typename Iter1, typename Iter2, typename C >
struct next< pair_iter<Iter1,Iter2,C> >
{
typedef typename mpl::next<Iter1>::type i1_;
typedef typename mpl::next<Iter2>::type i2_;
typedef pair_iter<i1_,i2_,C> type;
};
template< typename Iter1, typename Iter2, typename C >
struct prior< pair_iter<Iter1,Iter2,C> >
{
typedef typename mpl::prior<Iter1>::type i1_;
typedef typename mpl::prior<Iter2>::type i2_;
typedef pair_iter<i1_,i2_,C> type;
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template<> struct advance_impl<aux::pair_iter_tag>
{
template< typename Iter, typename D > struct apply
{
typedef typename mpl::advance< typename Iter::first,D >::type i1_;
typedef typename mpl::advance< typename Iter::second,D >::type i2_;
typedef pair_iter<i1_,i2_,typename Iter::category> type;
};
};
template<> struct distance_impl<aux::pair_iter_tag>
{
template< typename Iter1, typename Iter2 > struct apply
{
// agurt, 10/nov/04: MSVC 6.5 ICE-s on forwarding
typedef typename mpl::distance<
typename first<Iter1>::type
, typename first<Iter2>::type
>::type type;
};
};
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence1)
, typename BOOST_MPL_AUX_NA_PARAM(Sequence2)
>
struct pair_view
{
typedef nested_begin_end_tag tag;
typedef typename begin<Sequence1>::type iter1_;
typedef typename begin<Sequence2>::type iter2_;
typedef typename min<
typename iterator_category<iter1_>::type
, typename iterator_category<iter2_>::type
>::type category_;
typedef pair_iter<iter1_,iter2_,category_> begin;
typedef pair_iter<
typename end<Sequence1>::type
, typename end<Sequence2>::type
, category_
> end;
};
BOOST_MPL_AUX_NA_SPEC(2, pair_view)
}}
#endif // BOOST_MPL_PAIR_VIEW_HPP_INCLUDED

View File

@ -0,0 +1,40 @@
#ifndef BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/at_fwd.hpp>
#include <boost/mpl/set/aux_/has_key_impl.hpp>
#include <boost/mpl/set/aux_/tag.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/void.hpp>
namespace boost { namespace mpl {
template<>
struct at_impl< aux::set_tag >
{
template< typename Set, typename T > struct apply
{
typedef typename if_<
has_key_impl<aux::set_tag>::apply<Set,T>
, T
, void_
>::type type;
};
};
}}
#endif // BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,43 @@
#ifndef BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2007
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/begin_end_fwd.hpp>
#include <boost/mpl/set/aux_/iterator.hpp>
namespace boost { namespace mpl {
template<>
struct begin_impl< aux::set_tag >
{
template< typename Set > struct apply
: s_iter_get<Set,typename Set::item_>
{
};
};
template<>
struct end_impl< aux::set_tag >
{
template< typename Set > struct apply
{
typedef s_iter< Set,set0<> > type;
};
};
}}
#endif // BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,35 @@
#ifndef BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/clear_fwd.hpp>
#include <boost/mpl/set/aux_/set0.hpp>
#include <boost/mpl/set/aux_/tag.hpp>
namespace boost { namespace mpl {
template<>
struct clear_impl< aux::set_tag >
{
template< typename Set > struct apply
{
typedef set0<> type;
};
};
}}
#endif // BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,34 @@
#ifndef BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/empty_fwd.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/set/aux_/tag.hpp>
namespace boost { namespace mpl {
template<>
struct empty_impl< aux::set_tag >
{
template< typename Set > struct apply
: not_< typename Set::size >
{
};
};
}}
#endif // BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,41 @@
#ifndef BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/erase_fwd.hpp>
#include <boost/mpl/set/aux_/erase_key_impl.hpp>
#include <boost/mpl/set/aux_/tag.hpp>
namespace boost { namespace mpl {
template<>
struct erase_impl< aux::set_tag >
{
template<
typename Set
, typename Pos
, typename unused_
>
struct apply
: erase_key_impl<aux::set_tag>
::apply<Set,typename Pos::type>
{
};
};
}}
#endif // BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,53 @@
#ifndef BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2007
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/erase_key_fwd.hpp>
#include <boost/mpl/set/aux_/has_key_impl.hpp>
#include <boost/mpl/set/aux_/item.hpp>
#include <boost/mpl/set/aux_/tag.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/base.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace mpl {
template<>
struct erase_key_impl< aux::set_tag >
{
template<
typename Set
, typename T
>
struct apply
: eval_if<
has_key_impl<aux::set_tag>::apply<Set,T>
, eval_if<
is_same< T,typename Set::item_type_ >
, base<Set>
, identity< s_mask<T,typename Set::item_> >
>
, identity<Set>
>
{
};
};
}}
#endif // BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,60 @@
#ifndef BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/set/aux_/tag.hpp>
#include <boost/mpl/has_key_fwd.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/aux_/overload_names.hpp>
#include <boost/mpl/aux_/static_cast.hpp>
#include <boost/mpl/aux_/yes_no.hpp>
#include <boost/mpl/aux_/type_wrapper.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
namespace boost { namespace mpl {
template<>
struct has_key_impl< aux::set_tag >
{
template< typename Set, typename T > struct apply
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
|| BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
{
BOOST_STATIC_CONSTANT(bool, value =
( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(
Set
, BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<T>*, 0)
) ) == sizeof(aux::no_tag) )
);
typedef bool_<value> type;
#else // ISO98 C++
: bool_<
( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(
Set
, BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<T>*, 0)
) ) == sizeof(aux::no_tag) )
>
{
#endif
};
};
}}
#endif // BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,65 @@
#ifndef BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2007
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/insert_fwd.hpp>
#include <boost/mpl/set/aux_/has_key_impl.hpp>
#include <boost/mpl/set/aux_/item.hpp>
#include <boost/mpl/set/aux_/tag.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/base.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/aux_/na.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace mpl {
namespace aux {
template< typename Set, typename T > struct set_insert_impl
: eval_if<
has_key_impl<aux::set_tag>::apply<Set,T>
, identity<Set>
, eval_if<
is_same< T,typename Set::last_masked_ >
, base<Set>
, identity< s_item<T,typename Set::item_> >
>
>
{
};
}
template<>
struct insert_impl< aux::set_tag >
{
template<
typename Set
, typename PosOrKey
, typename KeyOrNA
>
struct apply
: aux::set_insert_impl<
Set
, typename if_na<KeyOrNA,PosOrKey>::type
>
{
};
};
}}
#endif // BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,41 @@
#ifndef BOOST_MPL_SET_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
// Copyright Bruno Dutra 2015
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/insert_range_fwd.hpp>
#include <boost/mpl/set/aux_/tag.hpp>
#include <boost/mpl/placeholders.hpp>
#include <boost/mpl/fold.hpp>
#include <boost/mpl/insert.hpp>
namespace boost { namespace mpl {
template<>
struct insert_range_impl< aux::set_tag >
{
template<
typename Sequence
, typename /*Pos*/
, typename Range
>
struct apply
: fold<Range, Sequence, insert<_1, _2> >
{
};
};
}}
#endif // BOOST_MPL_SET_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,82 @@
#ifndef BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2007
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/long.hpp>
#include <boost/mpl/void.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/prior.hpp>
#include <boost/mpl/set/aux_/set0.hpp>
#include <boost/mpl/aux_/type_wrapper.hpp>
#include <boost/mpl/aux_/config/arrays.hpp>
namespace boost { namespace mpl {
template< typename T, typename Base >
struct s_item
: Base
{
typedef s_item<T,Base> item_;
typedef void_ last_masked_;
typedef T item_type_;
typedef typename Base::item_ base;
typedef s_item type;
typedef typename next< typename Base::size >::type size;
typedef typename next< typename Base::order >::type order;
#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES)
typedef typename aux::weighted_tag<BOOST_MPL_AUX_MSVC_VALUE_WKND(order)::value>::type order_tag_;
#else
typedef char (&order_tag_)[BOOST_MPL_AUX_MSVC_VALUE_WKND(order)::value];
#endif
BOOST_MPL_AUX_SET_OVERLOAD( order_tag_, ORDER_BY_KEY, s_item, aux::type_wrapper<T>* );
BOOST_MPL_AUX_SET_OVERLOAD( aux::no_tag, IS_MASKED, s_item, aux::type_wrapper<T>* );
};
template< typename T, typename Base >
struct s_mask
: Base
{
typedef s_mask<T,Base> item_;
typedef T last_masked_;
typedef void_ item_type_;
typedef typename Base::item_ base;
typedef typename prior< typename Base::size >::type size;
typedef s_mask type;
BOOST_MPL_AUX_SET_OVERLOAD( aux::yes_tag, IS_MASKED, s_mask, aux::type_wrapper<T>* );
};
template< typename T, typename Base >
struct s_unmask
: Base
{
typedef s_unmask<T,Base> item_;
typedef void_ last_masked_;
typedef T item_type_;
typedef typename Base::item_ base;
typedef typename next< typename Base::size >::type size;
BOOST_MPL_AUX_SET_OVERLOAD( aux::no_tag, IS_MASKED, s_unmask, aux::type_wrapper<T>* );
};
}}
#endif // BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED

View File

@ -0,0 +1,98 @@
#ifndef BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2007
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/set/aux_/set0.hpp>
#include <boost/mpl/has_key.hpp>
#include <boost/mpl/iterator_tags.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/aux_/config/ctps.hpp>
namespace boost { namespace mpl {
// used by 's_iter_get'
template< typename Set, typename Tail > struct s_iter;
template< typename Set, typename Tail > struct s_iter_get
: eval_if<
has_key< Set,typename Tail::item_type_ >
, identity< s_iter<Set,Tail> >
, next< s_iter<Set,Tail> >
>
{
};
template< typename Set, typename Tail > struct s_iter_impl
{
typedef Tail tail_;
typedef forward_iterator_tag category;
typedef typename Tail::item_type_ type;
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
typedef typename s_iter_get< Set,typename Tail::base >::type next;
#endif
};
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename Set, typename Tail >
struct next< s_iter<Set,Tail> >
: s_iter_get< Set,typename Tail::base >
{
};
template< typename Set >
struct next< s_iter<Set,set0<> > >
{
typedef s_iter<Set,set0<> > type;
};
template< typename Set, typename Tail > struct s_iter
: s_iter_impl<Set,Tail>
{
};
template< typename Set > struct s_iter<Set, set0<> >
{
typedef forward_iterator_tag category;
};
#else
template< typename Set >
struct s_end_iter
{
typedef forward_iterator_tag category;
typedef s_iter<Set,set0<> > next;
};
template< typename Set, typename Tail > struct s_iter
: if_<
is_same< Tail,set0<> >
, s_end_iter<Set>
, s_iter_impl<Set,Tail>
>::type
{
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
}}
#endif // BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED

View File

@ -0,0 +1,34 @@
#ifndef BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/key_type_fwd.hpp>
#include <boost/mpl/set/aux_/tag.hpp>
namespace boost { namespace mpl {
template<>
struct key_type_impl< aux::set_tag >
{
template< typename Set, typename T > struct apply
{
typedef T type;
};
};
}}
#endif // BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,69 @@
#ifndef BOOST_MPL_SET_AUX_SET0_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_SET0_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/long.hpp>
#include <boost/mpl/void.hpp>
#include <boost/mpl/aux_/na.hpp>
#include <boost/mpl/set/aux_/tag.hpp>
#include <boost/mpl/aux_/yes_no.hpp>
#include <boost/mpl/aux_/overload_names.hpp>
#include <boost/mpl/aux_/config/operators.hpp>
#include <boost/preprocessor/cat.hpp>
namespace boost { namespace mpl {
#if defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING)
# define BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T) \
friend R BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f)(X const&, T) \
/**/
# define BOOST_MPL_AUX_SET_OVERLOAD(R, f, X, T) \
BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T) \
/**/
#else
# define BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T) \
static R BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f)(X const&, T) \
/**/
# define BOOST_MPL_AUX_SET_OVERLOAD(R, f, X, T) \
BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T); \
using Base::BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f) \
/**/
#endif
template< typename Dummy = na > struct set0
{
typedef set0<> item_;
typedef item_ type;
typedef aux::set_tag tag;
typedef void_ last_masked_;
typedef void_ item_type_;
typedef long_<0> size;
typedef long_<1> order;
BOOST_MPL_AUX_SET0_OVERLOAD( aux::no_tag, ORDER_BY_KEY, set0<>, void const volatile* );
BOOST_MPL_AUX_SET0_OVERLOAD( aux::yes_tag, IS_MASKED, set0<>, void const volatile* );
};
}}
#endif // BOOST_MPL_SET_AUX_SET0_HPP_INCLUDED

View File

@ -0,0 +1,33 @@
#ifndef BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/size_fwd.hpp>
#include <boost/mpl/set/aux_/tag.hpp>
namespace boost { namespace mpl {
template<>
struct size_impl< aux::set_tag >
{
template< typename Set > struct apply
: Set::size
{
};
};
}}
#endif // BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED

View File

@ -0,0 +1,24 @@
#ifndef BOOST_MPL_SET_AUX_TAG_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_TAG_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
namespace boost { namespace mpl { namespace aux {
struct set_tag;
}}}
#endif // BOOST_MPL_SET_AUX_TAG_HPP_INCLUDED

View File

@ -0,0 +1,34 @@
#ifndef BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/value_type_fwd.hpp>
#include <boost/mpl/set/aux_/tag.hpp>
namespace boost { namespace mpl {
template<>
struct value_type_impl< aux::set_tag >
{
template< typename Set, typename T > struct apply
{
typedef T type;
};
};
}}
#endif // BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED

36
3rdparty/boost/boost/mpl/set/set0.hpp vendored Normal file
View File

@ -0,0 +1,36 @@
#ifndef BOOST_MPL_SET_SET0_HPP_INCLUDED
#define BOOST_MPL_SET_SET0_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/set/aux_/at_impl.hpp>
#include <boost/mpl/set/aux_/clear_impl.hpp>
//#include <boost/mpl/set/aux_/O1_size.hpp>
#include <boost/mpl/set/aux_/size_impl.hpp>
#include <boost/mpl/set/aux_/empty_impl.hpp>
#include <boost/mpl/set/aux_/insert_impl.hpp>
#include <boost/mpl/set/aux_/insert_range_impl.hpp>
#include <boost/mpl/set/aux_/erase_impl.hpp>
#include <boost/mpl/set/aux_/erase_key_impl.hpp>
#include <boost/mpl/set/aux_/has_key_impl.hpp>
#include <boost/mpl/set/aux_/key_type_impl.hpp>
#include <boost/mpl/set/aux_/value_type_impl.hpp>
#include <boost/mpl/set/aux_/begin_end_impl.hpp>
#include <boost/mpl/set/aux_/iterator.hpp>
#include <boost/mpl/set/aux_/item.hpp>
#include <boost/mpl/set/aux_/set0.hpp>
#include <boost/mpl/set/aux_/tag.hpp>
#endif // BOOST_MPL_SET_SET0_HPP_INCLUDED

36
3rdparty/boost/boost/mpl/sizeof.hpp vendored Normal file
View File

@ -0,0 +1,36 @@
#ifndef BOOST_MPL_SIZEOF_HPP_INCLUDED
#define BOOST_MPL_SIZEOF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2003
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/size_t.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct sizeof_
: mpl::size_t< sizeof(T) >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,sizeof_,(T))
};
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, sizeof_)
}}
#endif // BOOST_MPL_SIZEOF_HPP_INCLUDED

145
3rdparty/boost/boost/mpl/transform.hpp vendored Normal file
View File

@ -0,0 +1,145 @@
#ifndef BOOST_MPL_TRANSFORM_HPP_INCLUDED
#define BOOST_MPL_TRANSFORM_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/fold.hpp>
#include <boost/mpl/reverse_fold.hpp>
#include <boost/mpl/pair_view.hpp>
#include <boost/mpl/is_sequence.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/lambda.hpp>
#include <boost/mpl/bind.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/aux_/na.hpp>
#include <boost/mpl/aux_/inserter_algorithm.hpp>
namespace boost { namespace mpl {
namespace aux {
template<
typename Seq
, typename Op
, typename In
>
struct transform1_impl
: fold<
Seq
, typename In::state
, bind2< typename lambda< typename In::operation >::type
, _1
, bind1< typename lambda<Op>::type, _2>
>
>
{
};
template<
typename Seq
, typename Op
, typename In
>
struct reverse_transform1_impl
: reverse_fold<
Seq
, typename In::state
, bind2< typename lambda< typename In::operation >::type
, _1
, bind1< typename lambda<Op>::type, _2>
>
>
{
};
template<
typename Seq1
, typename Seq2
, typename Op
, typename In
>
struct transform2_impl
: fold<
pair_view<Seq1,Seq2>
, typename In::state
, bind2< typename lambda< typename In::operation >::type
, _1
, bind2<
typename lambda<Op>::type
, bind1<first<>,_2>
, bind1<second<>,_2>
>
>
>
{
};
template<
typename Seq1
, typename Seq2
, typename Op
, typename In
>
struct reverse_transform2_impl
: reverse_fold<
pair_view<Seq1,Seq2>
, typename In::state
, bind2< typename lambda< typename In::operation >::type
, _1
, bind2< typename lambda< Op >::type
, bind1<first<>,_2>
, bind1<second<>,_2>
>
>
>
{
};
} // namespace aux
BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, transform1)
BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, transform2)
#define AUX778076_TRANSFORM_DEF(name) \
template< \
typename BOOST_MPL_AUX_NA_PARAM(Seq1) \
, typename BOOST_MPL_AUX_NA_PARAM(Seq2OrOperation) \
, typename BOOST_MPL_AUX_NA_PARAM(OperationOrInserter) \
, typename BOOST_MPL_AUX_NA_PARAM(Inserter) \
> \
struct name \
{ \
typedef typename eval_if< \
or_< \
is_na<OperationOrInserter> \
, is_lambda_expression< Seq2OrOperation > \
, not_< is_sequence<Seq2OrOperation> > \
> \
, name##1<Seq1,Seq2OrOperation,OperationOrInserter> \
, name##2<Seq1,Seq2OrOperation,OperationOrInserter,Inserter> \
>::type type; \
}; \
BOOST_MPL_AUX_NA_SPEC(4, name) \
/**/
AUX778076_TRANSFORM_DEF(transform)
AUX778076_TRANSFORM_DEF(reverse_transform)
#undef AUX778076_TRANSFORM_DEF
}}
#endif // BOOST_MPL_TRANSFORM_HPP_INCLUDED

View File

@ -0,0 +1,25 @@
#ifndef BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED
#define BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// 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/mpl for documentation.
// $Id$
// $Date$
// $Revision$
namespace boost { namespace mpl {
template< typename Tag > struct value_type_impl;
template< typename AssociativeSequence, typename T > struct value_type;
}}
#endif // BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED

View File

@ -0,0 +1,453 @@
/* Copyright 2003-2013 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
* See http://www.boost.org/libs/multi_index for library home page.
*/
#ifndef BOOST_MULTI_INDEX_DETAIL_SCOPE_GUARD_HPP
#define BOOST_MULTI_INDEX_DETAIL_SCOPE_GUARD_HPP
#if defined(_MSC_VER)
#pragma once
#endif
#include <boost/detail/no_exceptions_support.hpp>
#include <boost/mpl/if.hpp>
namespace boost{
namespace multi_index{
namespace detail{
/* Until some official version of the ScopeGuard idiom makes it into Boost,
* we locally define our own. This is a merely reformated version of
* ScopeGuard.h as defined in:
* Alexandrescu, A., Marginean, P.:"Generic<Programming>: Change the Way You
* Write Exception-Safe Code - Forever", C/C++ Users Jornal, Dec 2000,
* http://www.drdobbs.com/184403758
* with the following modifications:
* - General pretty formatting (pretty to my taste at least.)
* - Naming style changed to standard C++ library requirements.
* - Added scope_guard_impl4 and obj_scope_guard_impl3, (Boost.MultiIndex
* needs them). A better design would provide guards for many more
* arguments through the Boost Preprocessor Library.
* - Added scope_guard_impl_base::touch (see below.)
* - Removed RefHolder and ByRef, whose functionality is provided
* already by Boost.Ref.
* - Removed static make_guard's and make_obj_guard's, so that the code
* will work even if BOOST_NO_MEMBER_TEMPLATES is defined. This forces
* us to move some private ctors to public, though.
*
* NB: CodeWarrior Pro 8 seems to have problems looking up safe_execute
* without an explicit qualification.
*
* We also define the following variants of the idiom:
*
* - make_guard_if_c<bool>( ... )
* - make_guard_if<IntegralConstant>( ... )
* - make_obj_guard_if_c<bool>( ... )
* - make_obj_guard_if<IntegralConstant>( ... )
* which may be used with a compile-time constant to yield
* a "null_guard" if the boolean compile-time parameter is false,
* or conversely, the guard is only constructed if the constant is true.
* This is useful to avoid extra tagging, because the returned
* null_guard can be optimzed comlpetely away by the compiler.
*/
class scope_guard_impl_base
{
public:
scope_guard_impl_base():dismissed_(false){}
void dismiss()const{dismissed_=true;}
/* This helps prevent some "unused variable" warnings under, for instance,
* GCC 3.2.
*/
void touch()const{}
protected:
~scope_guard_impl_base(){}
scope_guard_impl_base(const scope_guard_impl_base& other):
dismissed_(other.dismissed_)
{
other.dismiss();
}
template<typename J>
static void safe_execute(J& j){
BOOST_TRY{
if(!j.dismissed_)j.execute();
}
BOOST_CATCH(...){}
BOOST_CATCH_END
}
mutable bool dismissed_;
private:
scope_guard_impl_base& operator=(const scope_guard_impl_base&);
};
typedef const scope_guard_impl_base& scope_guard;
struct null_guard : public scope_guard_impl_base
{
template< class T1 >
null_guard( const T1& )
{ }
template< class T1, class T2 >
null_guard( const T1&, const T2& )
{ }
template< class T1, class T2, class T3 >
null_guard( const T1&, const T2&, const T3& )
{ }
template< class T1, class T2, class T3, class T4 >
null_guard( const T1&, const T2&, const T3&, const T4& )
{ }
template< class T1, class T2, class T3, class T4, class T5 >
null_guard( const T1&, const T2&, const T3&, const T4&, const T5& )
{ }
};
template< bool cond, class T >
struct null_guard_return
{
typedef typename boost::mpl::if_c<cond,T,null_guard>::type type;
};
template<typename F>
class scope_guard_impl0:public scope_guard_impl_base
{
public:
scope_guard_impl0(F fun):fun_(fun){}
~scope_guard_impl0(){scope_guard_impl_base::safe_execute(*this);}
void execute(){fun_();}
protected:
F fun_;
};
template<typename F>
inline scope_guard_impl0<F> make_guard(F fun)
{
return scope_guard_impl0<F>(fun);
}
template<bool cond, typename F>
inline typename null_guard_return<cond,scope_guard_impl0<F> >::type
make_guard_if_c(F fun)
{
return typename null_guard_return<cond,scope_guard_impl0<F> >::type(fun);
}
template<typename C, typename F>
inline typename null_guard_return<C::value,scope_guard_impl0<F> >::type
make_guard_if(F fun)
{
return make_guard_if<C::value>(fun);
}
template<typename F,typename P1>
class scope_guard_impl1:public scope_guard_impl_base
{
public:
scope_guard_impl1(F fun,P1 p1):fun_(fun),p1_(p1){}
~scope_guard_impl1(){scope_guard_impl_base::safe_execute(*this);}
void execute(){fun_(p1_);}
protected:
F fun_;
const P1 p1_;
};
template<typename F,typename P1>
inline scope_guard_impl1<F,P1> make_guard(F fun,P1 p1)
{
return scope_guard_impl1<F,P1>(fun,p1);
}
template<bool cond, typename F,typename P1>
inline typename null_guard_return<cond,scope_guard_impl1<F,P1> >::type
make_guard_if_c(F fun,P1 p1)
{
return typename null_guard_return<cond,scope_guard_impl1<F,P1> >::type(fun,p1);
}
template<typename C, typename F,typename P1>
inline typename null_guard_return<C::value,scope_guard_impl1<F,P1> >::type
make_guard_if(F fun,P1 p1)
{
return make_guard_if_c<C::value>(fun,p1);
}
template<typename F,typename P1,typename P2>
class scope_guard_impl2:public scope_guard_impl_base
{
public:
scope_guard_impl2(F fun,P1 p1,P2 p2):fun_(fun),p1_(p1),p2_(p2){}
~scope_guard_impl2(){scope_guard_impl_base::safe_execute(*this);}
void execute(){fun_(p1_,p2_);}
protected:
F fun_;
const P1 p1_;
const P2 p2_;
};
template<typename F,typename P1,typename P2>
inline scope_guard_impl2<F,P1,P2> make_guard(F fun,P1 p1,P2 p2)
{
return scope_guard_impl2<F,P1,P2>(fun,p1,p2);
}
template<bool cond, typename F,typename P1,typename P2>
inline typename null_guard_return<cond,scope_guard_impl2<F,P1,P2> >::type
make_guard_if_c(F fun,P1 p1,P2 p2)
{
return typename null_guard_return<cond,scope_guard_impl2<F,P1,P2> >::type(fun,p1,p2);
}
template<typename C, typename F,typename P1,typename P2>
inline typename null_guard_return<C::value,scope_guard_impl2<F,P1,P2> >::type
make_guard_if(F fun,P1 p1,P2 p2)
{
return make_guard_if_c<C::value>(fun,p1,p2);
}
template<typename F,typename P1,typename P2,typename P3>
class scope_guard_impl3:public scope_guard_impl_base
{
public:
scope_guard_impl3(F fun,P1 p1,P2 p2,P3 p3):fun_(fun),p1_(p1),p2_(p2),p3_(p3){}
~scope_guard_impl3(){scope_guard_impl_base::safe_execute(*this);}
void execute(){fun_(p1_,p2_,p3_);}
protected:
F fun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
};
template<typename F,typename P1,typename P2,typename P3>
inline scope_guard_impl3<F,P1,P2,P3> make_guard(F fun,P1 p1,P2 p2,P3 p3)
{
return scope_guard_impl3<F,P1,P2,P3>(fun,p1,p2,p3);
}
template<bool cond,typename F,typename P1,typename P2,typename P3>
inline typename null_guard_return<cond,scope_guard_impl3<F,P1,P2,P3> >::type
make_guard_if_c(F fun,P1 p1,P2 p2,P3 p3)
{
return typename null_guard_return<cond,scope_guard_impl3<F,P1,P2,P3> >::type(fun,p1,p2,p3);
}
template<typename C,typename F,typename P1,typename P2,typename P3>
inline typename null_guard_return< C::value,scope_guard_impl3<F,P1,P2,P3> >::type
make_guard_if(F fun,P1 p1,P2 p2,P3 p3)
{
return make_guard_if_c<C::value>(fun,p1,p2,p3);
}
template<typename F,typename P1,typename P2,typename P3,typename P4>
class scope_guard_impl4:public scope_guard_impl_base
{
public:
scope_guard_impl4(F fun,P1 p1,P2 p2,P3 p3,P4 p4):
fun_(fun),p1_(p1),p2_(p2),p3_(p3),p4_(p4){}
~scope_guard_impl4(){scope_guard_impl_base::safe_execute(*this);}
void execute(){fun_(p1_,p2_,p3_,p4_);}
protected:
F fun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
};
template<typename F,typename P1,typename P2,typename P3,typename P4>
inline scope_guard_impl4<F,P1,P2,P3,P4> make_guard(
F fun,P1 p1,P2 p2,P3 p3,P4 p4)
{
return scope_guard_impl4<F,P1,P2,P3,P4>(fun,p1,p2,p3,p4);
}
template<bool cond, typename F,typename P1,typename P2,typename P3,typename P4>
inline typename null_guard_return<cond,scope_guard_impl4<F,P1,P2,P3,P4> >::type
make_guard_if_c(
F fun,P1 p1,P2 p2,P3 p3,P4 p4)
{
return typename null_guard_return<cond,scope_guard_impl4<F,P1,P2,P3,P4> >::type(fun,p1,p2,p3,p4);
}
template<typename C, typename F,typename P1,typename P2,typename P3,typename P4>
inline typename null_guard_return<C::value,scope_guard_impl4<F,P1,P2,P3,P4> >::type
make_guard_if(
F fun,P1 p1,P2 p2,P3 p3,P4 p4)
{
return make_guard_if_c<C::value>(fun,p1,p2,p3,p4);
}
template<class Obj,typename MemFun>
class obj_scope_guard_impl0:public scope_guard_impl_base
{
public:
obj_scope_guard_impl0(Obj& obj,MemFun mem_fun):obj_(obj),mem_fun_(mem_fun){}
~obj_scope_guard_impl0(){scope_guard_impl_base::safe_execute(*this);}
void execute(){(obj_.*mem_fun_)();}
protected:
Obj& obj_;
MemFun mem_fun_;
};
template<class Obj,typename MemFun>
inline obj_scope_guard_impl0<Obj,MemFun> make_obj_guard(Obj& obj,MemFun mem_fun)
{
return obj_scope_guard_impl0<Obj,MemFun>(obj,mem_fun);
}
template<bool cond, class Obj,typename MemFun>
inline typename null_guard_return<cond,obj_scope_guard_impl0<Obj,MemFun> >::type
make_obj_guard_if_c(Obj& obj,MemFun mem_fun)
{
return typename null_guard_return<cond,obj_scope_guard_impl0<Obj,MemFun> >::type(obj,mem_fun);
}
template<typename C, class Obj,typename MemFun>
inline typename null_guard_return<C::value,obj_scope_guard_impl0<Obj,MemFun> >::type
make_obj_guard_if(Obj& obj,MemFun mem_fun)
{
return make_obj_guard_if_c<C::value>(obj,mem_fun);
}
template<class Obj,typename MemFun,typename P1>
class obj_scope_guard_impl1:public scope_guard_impl_base
{
public:
obj_scope_guard_impl1(Obj& obj,MemFun mem_fun,P1 p1):
obj_(obj),mem_fun_(mem_fun),p1_(p1){}
~obj_scope_guard_impl1(){scope_guard_impl_base::safe_execute(*this);}
void execute(){(obj_.*mem_fun_)(p1_);}
protected:
Obj& obj_;
MemFun mem_fun_;
const P1 p1_;
};
template<class Obj,typename MemFun,typename P1>
inline obj_scope_guard_impl1<Obj,MemFun,P1> make_obj_guard(
Obj& obj,MemFun mem_fun,P1 p1)
{
return obj_scope_guard_impl1<Obj,MemFun,P1>(obj,mem_fun,p1);
}
template<bool cond, class Obj,typename MemFun,typename P1>
inline typename null_guard_return<cond,obj_scope_guard_impl1<Obj,MemFun,P1> >::type
make_obj_guard_if_c( Obj& obj,MemFun mem_fun,P1 p1)
{
return typename null_guard_return<cond,obj_scope_guard_impl1<Obj,MemFun,P1> >::type(obj,mem_fun,p1);
}
template<typename C, class Obj,typename MemFun,typename P1>
inline typename null_guard_return<C::value,obj_scope_guard_impl1<Obj,MemFun,P1> >::type
make_obj_guard_if( Obj& obj,MemFun mem_fun,P1 p1)
{
return make_obj_guard_if_c<C::value>(obj,mem_fun,p1);
}
template<class Obj,typename MemFun,typename P1,typename P2>
class obj_scope_guard_impl2:public scope_guard_impl_base
{
public:
obj_scope_guard_impl2(Obj& obj,MemFun mem_fun,P1 p1,P2 p2):
obj_(obj),mem_fun_(mem_fun),p1_(p1),p2_(p2)
{}
~obj_scope_guard_impl2(){scope_guard_impl_base::safe_execute(*this);}
void execute(){(obj_.*mem_fun_)(p1_,p2_);}
protected:
Obj& obj_;
MemFun mem_fun_;
const P1 p1_;
const P2 p2_;
};
template<class Obj,typename MemFun,typename P1,typename P2>
inline obj_scope_guard_impl2<Obj,MemFun,P1,P2>
make_obj_guard(Obj& obj,MemFun mem_fun,P1 p1,P2 p2)
{
return obj_scope_guard_impl2<Obj,MemFun,P1,P2>(obj,mem_fun,p1,p2);
}
template<bool cond, class Obj,typename MemFun,typename P1,typename P2>
inline typename null_guard_return<cond,obj_scope_guard_impl2<Obj,MemFun,P1,P2> >::type
make_obj_guard_if_c(Obj& obj,MemFun mem_fun,P1 p1,P2 p2)
{
return typename null_guard_return<cond,obj_scope_guard_impl2<Obj,MemFun,P1,P2> >::type(obj,mem_fun,p1,p2);
}
template<typename C, class Obj,typename MemFun,typename P1,typename P2>
inline typename null_guard_return<C::value,obj_scope_guard_impl2<Obj,MemFun,P1,P2> >::type
make_obj_guard_if(Obj& obj,MemFun mem_fun,P1 p1,P2 p2)
{
return make_obj_guard_if_c<C::value>(obj,mem_fun,p1,p2);
}
template<class Obj,typename MemFun,typename P1,typename P2,typename P3>
class obj_scope_guard_impl3:public scope_guard_impl_base
{
public:
obj_scope_guard_impl3(Obj& obj,MemFun mem_fun,P1 p1,P2 p2,P3 p3):
obj_(obj),mem_fun_(mem_fun),p1_(p1),p2_(p2),p3_(p3)
{}
~obj_scope_guard_impl3(){scope_guard_impl_base::safe_execute(*this);}
void execute(){(obj_.*mem_fun_)(p1_,p2_,p3_);}
protected:
Obj& obj_;
MemFun mem_fun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
};
template<class Obj,typename MemFun,typename P1,typename P2,typename P3>
inline obj_scope_guard_impl3<Obj,MemFun,P1,P2,P3>
make_obj_guard(Obj& obj,MemFun mem_fun,P1 p1,P2 p2,P3 p3)
{
return obj_scope_guard_impl3<Obj,MemFun,P1,P2,P3>(obj,mem_fun,p1,p2,p3);
}
template<bool cond, class Obj,typename MemFun,typename P1,typename P2,typename P3>
inline typename null_guard_return<cond,obj_scope_guard_impl3<Obj,MemFun,P1,P2,P3> >::type
make_obj_guard_if_c(Obj& obj,MemFun mem_fun,P1 p1,P2 p2,P3 p3)
{
return typename null_guard_return<cond,obj_scope_guard_impl3<Obj,MemFun,P1,P2,P3> >::type(obj,mem_fun,p1,p2,p3);
}
template<typename C, class Obj,typename MemFun,typename P1,typename P2,typename P3>
inline typename null_guard_return<C::value,obj_scope_guard_impl3<Obj,MemFun,P1,P2,P3> >::type
make_obj_guard_if(Obj& obj,MemFun mem_fun,P1 p1,P2 p2,P3 p3)
{
return make_obj_guard_if_c<C::value>(obj,mem_fun,p1,p2,p3);
}
} /* namespace multi_index::detail */
} /* namespace multi_index */
} /* namespace boost */
#endif

View File

@ -1,892 +0,0 @@
// 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)
// 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)
// 03 Apr 08 Make sure "convertible to bool" is sufficient
// for T::operator<, etc. (Daniel Frey)
// 24 May 07 Changed empty_base to depend on T, see
// http://svn.boost.org/trac/boost/ticket/979
// 21 Oct 02 Modified implementation of operators to allow compilers with a
// correct named return value optimization (NRVO) to produce optimal
// code. (Daniel Frey)
// 02 Dec 01 Bug fixed in random_access_iteratable. (Helmut Zeisel)
// 28 Sep 01 Factored out iterator operator groups. (Daryle Walker)
// 27 Aug 01 'left' form for non commutative operators added;
// 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
// 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
// relational operators. Added classes for groups of related
// operators. Reimplemented example operator and iterator helper
// classes in terms of the new groups. (Daryle Walker, with help
// from Alexy Gurtovoy)
// 11 Feb 01 Fixed bugs in the iterator helpers which prevented explicitly
// supplied arguments from actually being used (Dave Abrahams)
// 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)
// 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.
// 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)
// 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
// operators.(Beman Dawes)
// 12 Nov 99 Add operators templates (Ed Brey)
// 11 Nov 99 Add single template parameter version for compilers without
// partial specialization (Beman Dawes)
// 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
// 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
// template name (e.g. 'addable') for both the 1- and 2-argument versions of
// an operator template. This implementation solves the backward-compatibility
// issue at the cost of some simplicity.
//
// One of the complications is an existence of special auxiliary class template
// '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
// operator template you add to the library.
//
// 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.
#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>
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#if defined(__sgi) && !defined(__GNUC__)
# pragma set woff 1234
#endif
#if BOOST_WORKAROUND(BOOST_MSVC, < 1600)
# pragma warning( disable : 4284 ) // complaint about return type of
#endif // operator-> not begin a UDT
// 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.
namespace boost
{
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 = 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); }
friend bool operator>=(const T& x, const U& y) { return !static_cast<bool>(x < y); }
friend bool operator>(const U& x, const T& y) { return y < x; }
friend bool operator<(const U& x, const T& y) { return y > x; }
friend bool operator<=(const U& x, const T& y) { return !static_cast<bool>(y < x); }
friend bool operator>=(const U& x, const T& y) { return !static_cast<bool>(y > x); }
};
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; }
friend bool operator<=(const T& x, const T& y) { return !static_cast<bool>(y < x); }
friend bool operator>=(const T& x, const T& y) { return !static_cast<bool>(x < y); }
};
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; }
friend bool operator!=(const U& y, const T& x) { return !static_cast<bool>(x == y); }
friend bool operator!=(const T& y, const U& x) { return !static_cast<bool>(y == x); }
};
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); }
};
// A macro which produces "name_2left" from "name".
#define BOOST_OPERATOR2_LEFT(name) name##2##_##left
// NRVO-friendly implementation (contributed by Daniel Frey) ---------------//
#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
// This is the optimal implementation for ISO/ANSI C++,
// but it requires the compiler to implement the NRVO.
// 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 = 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 = 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 = 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 = 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)
// For compilers without NRVO the following code is optimal, but not
// symmetric! Note that the implementation of
// BOOST_OPERATOR2_LEFT(NAME) only looks cool, but doesn't provide
// optimization opportunities to the compiler :)
#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( 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 = 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 = 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 = 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 = 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)
BOOST_BINARY_OPERATOR_COMMUTATIVE( multipliable, * )
BOOST_BINARY_OPERATOR_COMMUTATIVE( addable, + )
BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( subtractable, - )
BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( dividable, / )
BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( modable, % )
BOOST_BINARY_OPERATOR_COMMUTATIVE( xorable, ^ )
BOOST_BINARY_OPERATOR_COMMUTATIVE( andable, & )
BOOST_BINARY_OPERATOR_COMMUTATIVE( orable, | )
#undef BOOST_BINARY_OPERATOR_COMMUTATIVE
#undef BOOST_BINARY_OPERATOR_NON_COMMUTATIVE
#undef BOOST_OPERATOR2_LEFT
// incrementable and decrementable contributed by Jeremy Siek
template <class T, class B = operators_detail::empty_base<T> >
struct incrementable : B
{
friend T operator++(T& x, int)
{
incrementable_type nrv(x);
++x;
return nrv;
}
private: // The use of this typedef works around a Borland bug
typedef T incrementable_type;
};
template <class T, class B = operators_detail::empty_base<T> >
struct decrementable : B
{
friend T operator--(T& x, int)
{
decrementable_type nrv(x);
--x;
return nrv;
}
private: // The use of this typedef works around a Borland bug
typedef T decrementable_type;
};
// Iterator operator classes (contributed by Jeremy Siek) ------------------//
template <class T, class P, class B = operators_detail::empty_base<T> >
struct dereferenceable : B
{
P operator->() const
{
return &*static_cast<const T&>(*this);
}
};
template <class T, class I, class R, class B = operators_detail::empty_base<T> >
struct indexable : B
{
R operator[](I n) const
{
return *(static_cast<const T&>(*this) + n);
}
};
// More operator classes (contributed by Daryle Walker) --------------------//
// (NRVO-friendly implementation contributed by Daniel Frey) ---------------//
#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
#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 = 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)
BOOST_BINARY_OPERATOR( left_shiftable, << )
BOOST_BINARY_OPERATOR( right_shiftable, >> )
#undef BOOST_BINARY_OPERATOR
template <class T, class U, class B = operators_detail::empty_base<T> >
struct equivalent2 : B
{
friend bool operator==(const T& x, const U& y)
{
return !static_cast<bool>(x < y) && !static_cast<bool>(x > y);
}
};
template <class T, class B = operators_detail::empty_base<T> >
struct equivalent1 : B
{
friend bool operator==(const T&x, const T&y)
{
return !static_cast<bool>(x < y) && !static_cast<bool>(y < x);
}
};
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)
{ return static_cast<bool>(x < y) || static_cast<bool>(x == y); }
friend bool operator>=(const T& x, const U& y)
{ return static_cast<bool>(x > y) || static_cast<bool>(x == y); }
friend bool operator>(const U& x, const T& y)
{ return y < x; }
friend bool operator<(const U& x, const T& y)
{ return y > x; }
friend bool operator<=(const U& x, const T& y)
{ return static_cast<bool>(y > x) || static_cast<bool>(y == x); }
friend bool operator>=(const U& x, const T& y)
{ return static_cast<bool>(y < x) || static_cast<bool>(y == x); }
};
template <class T, class B = operators_detail::empty_base<T> >
struct partially_ordered1 : B
{
friend bool operator>(const T& x, const T& y)
{ return y < x; }
friend bool operator<=(const T& x, const T& y)
{ return static_cast<bool>(x < y) || static_cast<bool>(x == y); }
friend bool operator>=(const T& x, const T& y)
{ return static_cast<bool>(y < x) || static_cast<bool>(x == y); }
};
// Combined operator classes (contributed by Daryle Walker) ----------------//
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 = operators_detail::empty_base<T> >
struct totally_ordered1
: less_than_comparable1<T
, equality_comparable1<T, B
> > {};
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 = operators_detail::empty_base<T> >
struct additive1
: addable1<T
, subtractable1<T, B
> > {};
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 = operators_detail::empty_base<T> >
struct multiplicative1
: multipliable1<T
, dividable1<T, B
> > {};
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 = operators_detail::empty_base<T> >
struct integer_multiplicative1
: multiplicative1<T
, modable1<T, B
> > {};
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 = operators_detail::empty_base<T> >
struct arithmetic1
: additive1<T
, multiplicative1<T, B
> > {};
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 = operators_detail::empty_base<T> >
struct integer_arithmetic1
: additive1<T
, integer_multiplicative1<T, B
> > {};
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 = operators_detail::empty_base<T> >
struct bitwise1
: xorable1<T
, andable1<T
, orable1<T, B
> > > {};
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 = operators_detail::empty_base<T> >
struct shiftable2
: left_shiftable2<T, U
, right_shiftable2<T, U, B
> > {};
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 = operators_detail::empty_base<T> >
struct ring_operators2
: additive2<T, U
, subtractable2_left<T, U
, multipliable2<T, U, B
> > > {};
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 = operators_detail::empty_base<T> >
struct ordered_ring_operators2
: ring_operators2<T, U
, totally_ordered2<T, U, B
> > {};
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 = 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 = operators_detail::empty_base<T> >
struct field_operators1
: ring_operators1<T
, dividable1<T, B
> > {};
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 = operators_detail::empty_base<T> >
struct ordered_field_operators1
: field_operators1<T
, totally_ordered1<T, B
> > {};
template <class T, class U, class B = operators_detail::empty_base<T> >
struct euclidian_ring_operators2
: ring_operators2<T, U
, dividable2<T, U
, dividable2_left<T, U
, modable2<T, U
, modable2_left<T, U, B
> > > > > {};
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 = 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 = 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 = operators_detail::empty_base<T> >
struct euclidean_ring_operators2
: ring_operators2<T, U
, dividable2<T, U
, dividable2_left<T, U
, modable2<T, U
, modable2_left<T, U, B
> > > > > {};
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 = 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 = 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 = operators_detail::empty_base<T> >
struct input_iteratable
: equality_comparable1<T
, incrementable<T
, dereferenceable<T, P, B
> > > {};
template <class T, class B = operators_detail::empty_base<T> >
struct output_iteratable
: incrementable<T, B
> {};
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 = operators_detail::empty_base<T> >
struct bidirectional_iteratable
: forward_iteratable<T, P
, decrementable<T, B
> > {};
// To avoid repeated derivation from equality_comparable,
// 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 = operators_detail::empty_base<T> >
struct random_access_iteratable
: bidirectional_iteratable<T, P
, less_than_comparable1<T
, additive2<T, D
, indexable<T, D, R, 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.
//
namespace operators_detail
{
// 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 {};
} // 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.
// 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 operators_detail::false_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; \
};
// 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; \
};
// 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; \
};
// 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
// can be used for specifying both 1-argument and 2-argument forms. Requires the
// existence of two previously defined class templates named '<template_name>1'
// and '<template_name>2' which must implement the corresponding 1- and 2-
// argument forms.
//
// The template type parameter O == is_chained_base<U>::value is used to
// distinguish whether the 2nd argument to <template_name> is being used for
// base class chaining from another boost operator template or is describing a
// 2nd operand type. O == true_t only when U is actually an another operator
// template from the library. Partial specialization is used to select an
// 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 = 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)
BOOST_OPERATOR_TEMPLATE(less_than_comparable)
BOOST_OPERATOR_TEMPLATE(equality_comparable)
BOOST_OPERATOR_TEMPLATE(multipliable)
BOOST_OPERATOR_TEMPLATE(addable)
BOOST_OPERATOR_TEMPLATE(subtractable)
BOOST_OPERATOR_TEMPLATE2(subtractable2_left)
BOOST_OPERATOR_TEMPLATE(dividable)
BOOST_OPERATOR_TEMPLATE2(dividable2_left)
BOOST_OPERATOR_TEMPLATE(modable)
BOOST_OPERATOR_TEMPLATE2(modable2_left)
BOOST_OPERATOR_TEMPLATE(xorable)
BOOST_OPERATOR_TEMPLATE(andable)
BOOST_OPERATOR_TEMPLATE(orable)
BOOST_OPERATOR_TEMPLATE1(incrementable)
BOOST_OPERATOR_TEMPLATE1(decrementable)
BOOST_OPERATOR_TEMPLATE2(dereferenceable)
BOOST_OPERATOR_TEMPLATE3(indexable)
BOOST_OPERATOR_TEMPLATE(left_shiftable)
BOOST_OPERATOR_TEMPLATE(right_shiftable)
BOOST_OPERATOR_TEMPLATE(equivalent)
BOOST_OPERATOR_TEMPLATE(partially_ordered)
BOOST_OPERATOR_TEMPLATE(totally_ordered)
BOOST_OPERATOR_TEMPLATE(additive)
BOOST_OPERATOR_TEMPLATE(multiplicative)
BOOST_OPERATOR_TEMPLATE(integer_multiplicative)
BOOST_OPERATOR_TEMPLATE(arithmetic)
BOOST_OPERATOR_TEMPLATE(integer_arithmetic)
BOOST_OPERATOR_TEMPLATE(bitwise)
BOOST_OPERATOR_TEMPLATE1(unit_steppable)
BOOST_OPERATOR_TEMPLATE(shiftable)
BOOST_OPERATOR_TEMPLATE(ring_operators)
BOOST_OPERATOR_TEMPLATE(ordered_ring_operators)
BOOST_OPERATOR_TEMPLATE(field_operators)
BOOST_OPERATOR_TEMPLATE(ordered_field_operators)
BOOST_OPERATOR_TEMPLATE(euclidian_ring_operators)
BOOST_OPERATOR_TEMPLATE(ordered_euclidian_ring_operators)
BOOST_OPERATOR_TEMPLATE(euclidean_ring_operators)
BOOST_OPERATOR_TEMPLATE(ordered_euclidean_ring_operators)
BOOST_OPERATOR_TEMPLATE2(input_iteratable)
BOOST_OPERATOR_TEMPLATE1(output_iteratable)
BOOST_OPERATOR_TEMPLATE2(forward_iteratable)
BOOST_OPERATOR_TEMPLATE2(bidirectional_iteratable)
BOOST_OPERATOR_TEMPLATE4(random_access_iteratable)
#undef BOOST_OPERATOR_TEMPLATE
#undef BOOST_OPERATOR_TEMPLATE4
#undef BOOST_OPERATOR_TEMPLATE3
#undef BOOST_OPERATOR_TEMPLATE2
#undef BOOST_OPERATOR_TEMPLATE1
template <class T, class U>
struct operators2
: totally_ordered2<T,U
, integer_arithmetic2<T,U
, bitwise2<T,U
> > > {};
template <class T, class U = T>
struct operators : operators2<T, U> {};
template <class T> struct operators<T, T>
: totally_ordered<T
, integer_arithmetic<T
, bitwise<T
, unit_steppable<T
> > > > {};
// Iterator helper classes (contributed by Jeremy Siek) -------------------//
// (Input and output iterator helpers contributed by Daryle Walker) -------//
// (Changed to use combined operator classes by Daryle Walker) ------------//
template <class T,
class V,
class D = std::ptrdiff_t,
class P = V const *,
class R = V const &>
struct input_iterator_helper
: input_iteratable<T, P
, std::iterator<std::input_iterator_tag, V, D, P, R
> > {};
template<class T>
struct output_iterator_helper
: output_iteratable<T
, std::iterator<std::output_iterator_tag, void, void, void, void
> >
{
T& operator*() { return static_cast<T&>(*this); }
T& operator++() { return static_cast<T&>(*this); }
};
template <class T,
class V,
class D = std::ptrdiff_t,
class P = V*,
class R = V&>
struct forward_iterator_helper
: forward_iteratable<T, P
, std::iterator<std::forward_iterator_tag, V, D, P, R
> > {};
template <class T,
class V,
class D = std::ptrdiff_t,
class P = V*,
class R = V&>
struct bidirectional_iterator_helper
: bidirectional_iteratable<T, P
, std::iterator<std::bidirectional_iterator_tag, V, D, P, R
> > {};
template <class T,
class V,
class D = std::ptrdiff_t,
class P = V*,
class R = V&>
struct random_access_iterator_helper
: random_access_iteratable<T, P, D, R
, std::iterator<std::random_access_iterator_tag, V, D, P, R
> >
{
friend D requires_difference_operator(const T& x, const T& y) {
return x - y;
}
}; // 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

21
3rdparty/boost/boost/parameter.hpp vendored Executable file
View File

@ -0,0 +1,21 @@
// Copyright David Abrahams, Daniel Wallin 2005. 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 www.boost.org/libs/parameter for documentation.
#ifndef BOOST_PARAMETER_050401_HPP
#define BOOST_PARAMETER_050401_HPP
#include <boost/parameter/parameters.hpp>
#include <boost/parameter/keyword.hpp>
#include <boost/parameter/binding.hpp>
#include <boost/parameter/value_type.hpp>
#include <boost/parameter/macros.hpp>
#include <boost/parameter/match.hpp>
#include <boost/parameter/name.hpp>
#include <boost/parameter/preprocessor.hpp>
#endif // BOOST_PARAMETER_050401_HPP

View File

@ -0,0 +1,436 @@
// Copyright Daniel Wallin, David Abrahams 2005. 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)
#ifndef ARG_LIST_050329_HPP
#define ARG_LIST_050329_HPP
#include <boost/parameter/aux_/void.hpp>
#include <boost/parameter/aux_/result_of0.hpp>
#include <boost/parameter/aux_/default.hpp>
#include <boost/parameter/aux_/parameter_requirements.hpp>
#include <boost/parameter/aux_/yesno.hpp>
#include <boost/parameter/aux_/is_maybe.hpp>
#include <boost/parameter/config.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/mpl/begin.hpp>
#include <boost/mpl/end.hpp>
#include <boost/mpl/iterator_tags.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/facilities/intercept.hpp>
namespace boost { namespace parameter {
// Forward declaration for aux::arg_list, below.
template<class T> struct keyword;
namespace aux {
// Tag type passed to MPL lambda.
struct lambda_tag;
//
// Structures used to build the tuple of actual arguments. The
// tuple is a nested cons-style list of arg_list specializations
// terminated by an empty_arg_list.
//
// Each specialization of arg_list is derived from its successor in
// the list type. This feature is used along with using
// declarations to build member function overload sets that can
// match against keywords.
//
// MPL sequence support
struct arg_list_tag;
// Terminates arg_list<> and represents an empty list. Since this
// is just the terminating case you might want to look at arg_list
// first, to get a feel for what's really happening here.
struct empty_arg_list
{
empty_arg_list() {}
// Constructor taking BOOST_PARAMETER_MAX_ARITY empty_arg_list
// arguments; this makes initialization
empty_arg_list(
BOOST_PP_ENUM_PARAMS(
BOOST_PARAMETER_MAX_ARITY, void_ BOOST_PP_INTERCEPT
))
{}
// A metafunction class that, given a keyword and a default
// type, returns the appropriate result type for a keyword
// lookup given that default
struct binding
{
template<class KW, class Default, class Reference>
struct apply
{
typedef Default type;
};
};
// Terminator for has_key, indicating that the keyword is unique
template <class KW>
static no_tag has_key(KW*);
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
// The overload set technique doesn't work with these older
// compilers, so they need some explicit handholding.
// A metafunction class that, given a keyword, returns the type
// of the base sublist whose get() function can produce the
// value for that key
struct key_owner
{
template<class KW>
struct apply
{
typedef empty_arg_list type;
};
};
template <class K, class T>
T& get(default_<K,T> x) const
{
return x.value;
}
template <class K, class F>
typename result_of0<F>::type
get(lazy_default<K,F> x) const
{
return x.compute_default();
}
#endif
// If this function is called, it means there is no argument
// in the list that matches the supplied keyword. Just return
// the default value.
template <class K, class Default>
Default& operator[](default_<K, Default> x) const
{
return x.value;
}
// If this function is called, it means there is no argument
// in the list that matches the supplied keyword. Just evaluate
// and return the default value.
template <class K, class F>
typename result_of0<F>::type
operator[](
BOOST_PARAMETER_lazy_default_fallback<K,F> x) const
{
return x.compute_default();
}
// No argument corresponding to ParameterRequirements::key_type
// was found if we match this overload, so unless that parameter
// has a default, we indicate that the actual arguments don't
// match the function's requirements.
template <class ParameterRequirements, class ArgPack>
static typename ParameterRequirements::has_default
satisfies(ParameterRequirements*, ArgPack*);
// MPL sequence support
typedef empty_arg_list type; // convenience
typedef arg_list_tag tag; // For dispatching to sequence intrinsics
};
// Forward declaration for arg_list::operator,
template <class KW, class T>
struct tagged_argument;
template <class T>
struct get_reference
{
typedef typename T::reference type;
};
// A tuple of tagged arguments, terminated with empty_arg_list.
// Every TaggedArg is an instance of tagged_argument<>.
template <class TaggedArg, class Next = empty_arg_list>
struct arg_list : Next
{
typedef arg_list<TaggedArg,Next> self;
typedef typename TaggedArg::key_type key_type;
typedef typename is_maybe<typename TaggedArg::value_type>::type holds_maybe;
typedef typename mpl::eval_if<
holds_maybe
, get_reference<typename TaggedArg::value_type>
, get_reference<TaggedArg>
>::type reference;
typedef typename mpl::if_<
holds_maybe
, reference
, typename TaggedArg::value_type
>::type value_type;
TaggedArg arg; // Stores the argument
// Store the arguments in successive nodes of this list
template< // class A0, class A1, ...
BOOST_PP_ENUM_PARAMS(BOOST_PARAMETER_MAX_ARITY, class A)
>
arg_list( // A0& a0, A1& a1, ...
BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PARAMETER_MAX_ARITY, A, & a)
)
: Next( // a1, a2, ...
BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PARAMETER_MAX_ARITY, a)
, void_reference()
)
, arg(a0)
{}
// Create a new list by prepending arg to a copy of tail. Used
// when incrementally building this structure with the comma
// operator.
arg_list(TaggedArg head, Next const& tail)
: Next(tail)
, arg(head)
{}
// A metafunction class that, given a keyword and a default
// type, returns the appropriate result type for a keyword
// lookup given that default
struct binding
{
template <class KW, class Default, class Reference>
struct apply
{
typedef typename mpl::eval_if<
boost::is_same<KW, key_type>
, mpl::if_<Reference, reference, value_type>
, mpl::apply_wrap3<typename Next::binding, KW, Default, Reference>
>::type type;
};
};
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
// Overload for key_type, so the assert below will fire if the
// same keyword is used again
static yes_tag has_key(key_type*);
using Next::has_key;
BOOST_MPL_ASSERT_MSG(
sizeof(Next::has_key((key_type*)0)) == sizeof(no_tag)
, duplicate_keyword, (key_type)
);
#endif
//
// Begin implementation of indexing operators for looking up
// specific arguments by name
//
// Helpers that handle the case when TaggedArg is
// empty<T>.
template <class D>
reference get_default(D const&, mpl::false_) const
{
return arg.value;
}
template <class D>
reference get_default(D const& d, mpl::true_) const
{
return arg.value ? arg.value.get() : arg.value.construct(d.value);
}
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
// These older compilers don't support the overload set creation
// idiom well, so we need to do all the return type calculation
// for the compiler and dispatch through an outer function template
// A metafunction class that, given a keyword, returns the base
// sublist whose get() function can produce the value for that
// key.
struct key_owner
{
template<class KW>
struct apply
{
typedef typename mpl::eval_if<
boost::is_same<KW, key_type>
, mpl::identity<arg_list<TaggedArg,Next> >
, mpl::apply_wrap1<typename Next::key_owner,KW>
>::type type;
};
};
// Outer indexing operators that dispatch to the right node's
// get() function.
template <class KW>
typename mpl::apply_wrap3<binding, KW, void_, mpl::true_>::type
operator[](keyword<KW> const& x) const
{
typename mpl::apply_wrap1<key_owner, KW>::type const& sublist = *this;
return sublist.get(x);
}
template <class KW, class Default>
typename mpl::apply_wrap3<binding, KW, Default&, mpl::true_>::type
operator[](default_<KW, Default> x) const
{
typename mpl::apply_wrap1<key_owner, KW>::type const& sublist = *this;
return sublist.get(x);
}
template <class KW, class F>
typename mpl::apply_wrap3<
binding,KW
, typename result_of0<F>::type
, mpl::true_
>::type
operator[](lazy_default<KW,F> x) const
{
typename mpl::apply_wrap1<key_owner, KW>::type const& sublist = *this;
return sublist.get(x);
}
// These just return the stored value; when empty_arg_list is
// reached, indicating no matching argument was passed, the
// default is returned, or if no default_ or lazy_default was
// passed, compilation fails.
reference get(keyword<key_type> const&) const
{
BOOST_MPL_ASSERT_NOT((holds_maybe));
return arg.value;
}
template <class Default>
reference get(default_<key_type,Default> const& d) const
{
return get_default(d, holds_maybe());
}
template <class Default>
reference get(lazy_default<key_type, Default>) const
{
return arg.value;
}
#else
reference operator[](keyword<key_type> const&) const
{
BOOST_MPL_ASSERT_NOT((holds_maybe));
return arg.value;
}
template <class Default>
reference operator[](default_<key_type, Default> const& d) const
{
return get_default(d, holds_maybe());
}
template <class Default>
reference operator[](lazy_default<key_type, Default>) const
{
return arg.value;
}
// Builds an overload set including operator[]s defined in base
// classes.
using Next::operator[];
//
// End of indexing support
//
//
// For parameter_requirements matching this node's key_type,
// return a bool constant wrapper indicating whether the
// requirements are satisfied by TaggedArg. Used only for
// compile-time computation and never really called, so a
// declaration is enough.
//
template <class HasDefault, class Predicate, class ArgPack>
static typename mpl::apply_wrap2<
typename mpl::lambda<Predicate, lambda_tag>::type
, value_type, ArgPack
>::type
satisfies(
parameter_requirements<key_type,Predicate,HasDefault>*
, ArgPack*
);
// Builds an overload set including satisfies functions defined
// in base classes.
using Next::satisfies;
#endif
// Comma operator to compose argument list without using parameters<>.
// Useful for argument lists with undetermined length.
template <class KW, class T2>
arg_list<tagged_argument<KW, T2>, self>
operator,(tagged_argument<KW,T2> x) const
{
return arg_list<tagged_argument<KW,T2>, self>(x, *this);
}
// MPL sequence support
typedef self type; // Convenience for users
typedef Next tail_type; // For the benefit of iterators
typedef arg_list_tag tag; // For dispatching to sequence intrinsics
};
// MPL sequence support
template <class ArgumentPack>
struct arg_list_iterator
{
typedef mpl::forward_iterator_tag category;
// The incremented iterator
typedef arg_list_iterator<typename ArgumentPack::tail_type> next;
// dereferencing yields the key type
typedef typename ArgumentPack::key_type type;
};
template <>
struct arg_list_iterator<empty_arg_list> {};
}} // namespace parameter::aux
// MPL sequence support
namespace mpl
{
template <>
struct begin_impl<parameter::aux::arg_list_tag>
{
template <class S>
struct apply
{
typedef parameter::aux::arg_list_iterator<S> type;
};
};
template <>
struct end_impl<parameter::aux::arg_list_tag>
{
template <class>
struct apply
{
typedef parameter::aux::arg_list_iterator<parameter::aux::empty_arg_list> type;
};
};
}
} // namespace boost
#endif // ARG_LIST_050329_HPP

View File

@ -0,0 +1,141 @@
// Copyright Daniel Wallin 2006. 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)
#ifndef BOOST_PARAMETER_CAST_060902_HPP
# define BOOST_PARAMETER_CAST_060902_HPP
# include <boost/detail/workaround.hpp>
# if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
# include <boost/type_traits/add_reference.hpp>
# include <boost/type_traits/remove_const.hpp>
# endif
namespace boost { namespace parameter { namespace aux {
struct use_default_tag {};
# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
# define BOOST_PARAMETER_FUNCTION_CAST(value, predicate) value
# else
// Handles possible implicit casts. Used by preprocessor.hpp to
// normalize user input.
//
// cast<void*>::execute() is identity
// cast<void*(X)>::execute() is identity
// cast<void(X)>::execute() casts to X
//
// preprocessor.hpp uses this like this:
//
// #define X(value, predicate)
// cast<void predicate>::execute(value)
//
// X(something, *)
// X(something, *(predicate))
// X(something, (int))
template <class T, class Args>
struct cast;
template <class Args>
struct cast<void*, Args>
{
static use_default_tag execute(use_default_tag)
{
return use_default_tag();
}
static use_default_tag remove_const(use_default_tag)
{
return use_default_tag();
}
template <class U>
static U& execute(U& value)
{
return value;
}
template <class U>
static U& remove_const(U& x)
{
return x;
}
};
#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))
typedef void* voidstar;
template <class T, class Args>
struct cast<voidstar(T), Args>
: cast<void*, Args>
{
};
#else
template <class T, class Args>
struct cast<void*(T), Args>
: cast<void*, Args>
{
};
#endif
// This is a hack used in cast<> to turn the user supplied type,
// which may or may not be a placeholder expression into one, so
// that it will be properly evaluated by mpl::apply.
template <class T, class Dummy = mpl::_1>
struct as_placeholder_expr
{
typedef T type;
};
template <class T, class Args>
struct cast<void(T), Args>
{
typedef typename mpl::apply2<
as_placeholder_expr<T>, Args, Args>::type type0;
typedef typename boost::add_reference<
typename boost::remove_const<type0>::type
>::type reference;
static use_default_tag execute(use_default_tag)
{
return use_default_tag();
}
static use_default_tag remove_const(use_default_tag)
{
return use_default_tag();
}
static type0 execute(type0 value)
{
return value;
}
template <class U>
static reference remove_const(U const& x)
{
return const_cast<reference>(x);
}
};
# define BOOST_PARAMETER_FUNCTION_CAST(value, predicate, args) \
boost::parameter::aux::cast<void predicate, args>::remove_const( \
boost::parameter::aux::cast<void predicate, args>::execute(value) \
)
# endif
}}} // namespace boost::parameter::aux
#endif // BOOST_PARAMETER_CAST_060902_HPP

View File

@ -0,0 +1,69 @@
// Copyright Daniel Wallin, David Abrahams 2005. 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)
#ifndef DEFAULT_050329_HPP
# define DEFAULT_050329_HPP
# include <boost/detail/workaround.hpp>
namespace boost { namespace parameter { namespace aux {
// A wrapper for the default value passed by the user when resolving
// the value of the parameter with the given Keyword
template <class Keyword, class Value>
struct default_
{
default_(Value& x)
: value(x)
{}
Value& value;
};
//
// lazy_default --
//
// A wrapper for the default value computation function passed by
// the user when resolving the value of the parameter with the
// given keyword
//
# if BOOST_WORKAROUND(__EDG_VERSION__, <= 300)
// These compilers need a little extra help with overload
// resolution; we have empty_arg_list's operator[] accept a base
// class to make that overload less preferable.
template <class KW, class DefaultComputer>
struct lazy_default_base
{
lazy_default_base(DefaultComputer const& x)
: compute_default(x)
{}
DefaultComputer const& compute_default;
};
template <class KW, class DefaultComputer>
struct lazy_default
: lazy_default_base<KW,DefaultComputer>
{
lazy_default(DefaultComputer const & x)
: lazy_default_base<KW,DefaultComputer>(x)
{}
};
# define BOOST_PARAMETER_lazy_default_fallback lazy_default_base
# else
template <class KW, class DefaultComputer>
struct lazy_default
{
lazy_default(const DefaultComputer& x)
: compute_default(x)
{}
DefaultComputer const& compute_default;
};
# define BOOST_PARAMETER_lazy_default_fallback lazy_default
# endif
}}} // namespace boost::parameter::aux
#endif // DEFAULT_050329_HPP

View File

@ -0,0 +1,26 @@
// Copyright Daniel Wallin, David Abrahams 2010. 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)
#ifndef BOOST_PARAMETER_IS_MAYBE_050329_HPP
#define BOOST_PARAMETER_IS_MAYBE_050329_HPP
#include <boost/type_traits/is_base_and_derived.hpp>
namespace boost {
namespace parameter {
namespace aux {
struct maybe_base {};
template <class T>
struct is_maybe
: is_base_and_derived<maybe_base, T>
{};
} // namespace aux
} // namespace parameter
} // namespace boost
#endif // BOOST_PARAMETER_IS_MAYBE_050329_HPP

View File

@ -0,0 +1,88 @@
// Copyright David Abrahams, Daniel Wallin 2003. 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)
// This file generates overloads in this format:
//
// template<class A0, class A1>
// typename mpl::apply_wrap1<
// aux::make_arg_list<
// PS0,A0
// , aux::make_arg_list<
// PS1,A1
// , mpl::identity<aux::empty_arg_list>
// >
// >
// , unnamed_list
// >::type
// operator()(A0 const& a0, A1 const& a1) const
// {
// typedef typename mpl::apply_wrap1<
// aux::make_arg_list<
// PS0,A0
// , aux::make_arg_list<
// PS1,A1
// , mpl::identity<aux::empty_arg_list>
// >
// >
// >::type arg_tuple;
//
// return arg_tuple(
// a0
// , a1
// , aux::void_()
// ...
// );
// }
//
#if !defined(BOOST_PP_IS_ITERATING)
# error Boost.Parameters - do not include this file!
#endif
#define N BOOST_PP_ITERATION()
#define BOOST_PARAMETER_open_list(z, n, text) \
aux::item< \
BOOST_PP_CAT(PS, n), BOOST_PP_CAT(A, n)
#define BOOST_PARAMETER_close_list(z, n, text) >
#define BOOST_PARAMETER_arg_list(n) \
aux::make_arg_list< \
BOOST_PP_ENUM(N, BOOST_PARAMETER_open_list, _) \
, void_ \
BOOST_PP_REPEAT(N, BOOST_PARAMETER_close_list, _) \
, deduced_list \
, aux::tag_keyword_arg \
>
#define BOOST_PARAMETER_arg_pack_init(z, n, limit) \
BOOST_PP_CAT(a, BOOST_PP_SUB(limit,n))
template<BOOST_PP_ENUM_PARAMS(N, class A)>
typename mpl::first<
typename BOOST_PARAMETER_arg_list(N)::type
>::type
operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, & a)) const
{
typedef typename BOOST_PARAMETER_arg_list(N)::type result;
typedef typename mpl::first<result>::type result_type;
typedef typename mpl::second<result>::type error;
error();
return result_type(
BOOST_PP_ENUM(N, BOOST_PARAMETER_arg_pack_init, BOOST_PP_DEC(N))
BOOST_PP_ENUM_TRAILING_PARAMS(
BOOST_PP_SUB(BOOST_PARAMETER_MAX_ARITY, N)
, aux::void_reference() BOOST_PP_INTERCEPT
));
}
#undef BOOST_PARAMETER_arg_list
#undef BOOST_PARAMETER_open_list
#undef BOOST_PARAMETER_close_list
#undef N

View File

@ -0,0 +1,25 @@
// Copyright Daniel Wallin, David Abrahams 2005. 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)
#ifndef PARAMETER_REQUIREMENTS_050331_HPP
#define PARAMETER_REQUIREMENTS_050331_HPP
namespace boost { namespace parameter { namespace aux {
// Used to pass static information about parameter requirements
// through the satisfies() overload set (below). The
// matched function is never invoked, but its type indicates whether
// a parameter matches at compile-time
template <class Keyword, class Predicate, class HasDefault>
struct parameter_requirements
{
typedef Keyword keyword;
typedef Predicate predicate;
typedef HasDefault has_default;
};
}}} // namespace boost::parameter::aux
#endif // PARAMETER_REQUIREMENTS_050331_HPP

View File

@ -0,0 +1,35 @@
// Copyright David Abrahams 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_PARAMETER_AUX_PARENTHESIZED_TYPE_DWA2006414_HPP
# define BOOST_PARAMETER_AUX_PARENTHESIZED_TYPE_DWA2006414_HPP
# include <boost/config.hpp>
# include <boost/detail/workaround.hpp>
namespace boost { namespace parameter { namespace aux {
// A macro that takes a parenthesized C++ type name (T) and transforms
// it into an un-parenthesized type expression equivalent to T.
# define BOOST_PARAMETER_PARENTHESIZED_TYPE(x) \
boost::parameter::aux::unaryfunptr_arg_type< void(*)x >::type
// A metafunction that transforms void(*)(T) -> T
template <class UnaryFunctionPointer>
struct unaryfunptr_arg_type;
template <class Arg>
struct unaryfunptr_arg_type<void(*)(Arg)>
{
typedef Arg type;
};
template <>
struct unaryfunptr_arg_type<void(*)(void)>
{
typedef void type;
};
}}} // namespace boost::parameter::aux
#endif // BOOST_PARAMETER_AUX_PARENTHESIZED_TYPE_DWA2006414_HPP

View File

@ -0,0 +1,115 @@
// Copyright Daniel Wallin 2005. 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)
#ifndef BOOST_PARAMETER_FLATTEN_051217_HPP
# define BOOST_PARAMETER_FLATTEN_051217_HPP
# include <boost/preprocessor/tuple/elem.hpp>
# include <boost/preprocessor/tuple/rem.hpp>
# include <boost/preprocessor/cat.hpp>
# include <boost/preprocessor/seq/for_each.hpp>
# include <boost/preprocessor/seq/for_each_i.hpp>
# include <boost/preprocessor/identity.hpp>
# include <boost/preprocessor/selection/max.hpp>
# include <boost/preprocessor/arithmetic/sub.hpp>
# include <boost/preprocessor/repetition/enum_trailing.hpp>
# include <boost/parameter/aux_/preprocessor/for_each.hpp>
# define BOOST_PARAMETER_FLATTEN_SPLIT_required required,
# define BOOST_PARAMETER_FLATTEN_SPLIT_optional optional,
# define BOOST_PARAMETER_FLATTEN_SPLIT_deduced deduced,
# define BOOST_PARAMETER_FLATTEN_SPLIT(sub) \
BOOST_PP_CAT(BOOST_PARAMETER_FLATTEN_SPLIT_, sub)
# define BOOST_PARAMETER_FLATTEN_QUALIFIER(sub) \
BOOST_PP_SPLIT(0, BOOST_PARAMETER_FLATTEN_SPLIT(sub))
# define BOOST_PARAMETER_FLATTEN_ARGS(sub) \
BOOST_PP_SPLIT(1, BOOST_PARAMETER_FLATTEN_SPLIT(sub))
# define BOOST_PARAMETER_FLATTEN_ARITY_optional(arities) \
BOOST_PP_TUPLE_ELEM(3,0,arities)
# define BOOST_PARAMETER_FLATTEN_ARITY_required(arities) \
BOOST_PP_TUPLE_ELEM(3,1,arities)
# define BOOST_PARAMETER_FLATTEN_SPEC0_DUMMY_ELEM(z, n, data) ~
# define BOOST_PARAMETER_FLATTEN_SPEC0(r, n, elem, data) \
(( \
BOOST_PP_TUPLE_ELEM(3,2,data) \
, BOOST_PP_TUPLE_REM(BOOST_PP_TUPLE_ELEM(3,0,data)) elem \
BOOST_PP_ENUM_TRAILING( \
BOOST_PP_SUB( \
BOOST_PP_TUPLE_ELEM(3,1,data) \
, BOOST_PP_TUPLE_ELEM(3,0,data) \
) \
, BOOST_PARAMETER_FLATTEN_SPEC0_DUMMY_ELEM \
, ~ \
) \
))
# define BOOST_PARAMETER_FLATTEN_SPEC_AUX(r, arity, max_arity, spec, transform) \
BOOST_PARAMETER_FOR_EACH_R( \
r \
, arity \
, BOOST_PARAMETER_FLATTEN_ARGS(spec) \
, (arity, max_arity, transform(BOOST_PARAMETER_FLATTEN_QUALIFIER(spec))) \
, BOOST_PARAMETER_FLATTEN_SPEC0 \
)
# define BOOST_PARAMETER_FLATTEN_IDENTITY(x) x
# define BOOST_PARAMETER_FLATTEN_SPEC_optional(r, arities, spec) \
BOOST_PARAMETER_FLATTEN_SPEC_AUX( \
r \
, BOOST_PP_CAT( \
BOOST_PARAMETER_FLATTEN_ARITY_, BOOST_PARAMETER_FLATTEN_QUALIFIER(spec) \
)(arities) \
, BOOST_PP_TUPLE_ELEM(3,2,arities) \
, spec \
, BOOST_PARAMETER_FLATTEN_IDENTITY \
)
# define BOOST_PARAMETER_FLATTEN_SPEC_required(r, arities, spec) \
BOOST_PARAMETER_FLATTEN_SPEC_optional(r, arities, spec)
# define BOOST_PARAMETER_FLATTEN_SPEC_AS_DEDUCED(x) BOOST_PP_CAT(deduced_,x)
# define BOOST_PARAMETER_FLATTEN_SPEC_deduced_M(r, arities, n, spec) \
BOOST_PARAMETER_FLATTEN_SPEC_AUX( \
r \
, BOOST_PP_CAT( \
BOOST_PARAMETER_FLATTEN_ARITY_, BOOST_PARAMETER_FLATTEN_QUALIFIER(spec) \
)(arities) \
, BOOST_PP_TUPLE_ELEM(3,2,arities) \
, spec \
, BOOST_PARAMETER_FLATTEN_SPEC_AS_DEDUCED \
)
# define BOOST_PARAMETER_FLATTEN_SPEC_deduced(r, arities, spec) \
BOOST_PP_SEQ_FOR_EACH_I_R( \
r \
, BOOST_PARAMETER_FLATTEN_SPEC_deduced_M \
, arities \
, BOOST_PARAMETER_FLATTEN_ARGS(spec) \
)
# define BOOST_PARAMETER_FLATTEN_SPEC(r, arities, spec) \
BOOST_PP_CAT( \
BOOST_PARAMETER_FLATTEN_SPEC_, BOOST_PARAMETER_FLATTEN_QUALIFIER(spec) \
)(r, arities, spec)
# define BOOST_PARAMETER_FLATTEN(optional_arity, required_arity, wanted_arity, specs) \
BOOST_PP_SEQ_FOR_EACH( \
BOOST_PARAMETER_FLATTEN_SPEC \
, ( \
optional_arity, required_arity \
, wanted_arity \
) \
, specs \
)
#endif // BOOST_PARAMETER_FLATTEN_051217_HPP

View File

@ -0,0 +1,103 @@
// Copyright Daniel Wallin 2005. 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)
#ifndef BOOST_PARAMETER_FOR_EACH_051217_HPP
# define BOOST_PARAMETER_FOR_EACH_051217_HPP
# include <boost/preprocessor/cat.hpp>
# include <boost/preprocessor/detail/split.hpp>
# include <boost/preprocessor/logical/not.hpp>
# include <boost/preprocessor/facilities/is_empty.hpp>
# include <boost/preprocessor/tuple/eat.hpp>
# include <boost/preprocessor/arithmetic/inc.hpp>
# include <boost/preprocessor/repeat.hpp>
# include <boost/preprocessor/punctuation/comma_if.hpp>
# include <boost/preprocessor/for.hpp>
# include <boost/preprocessor/repetition/deduce_r.hpp>
# define BOOST_PARAMETER_FOR_EACH_head_aux2(x,y) (x,y), ~
# define BOOST_PARAMETER_FOR_EACH_head_aux3(x,y,z) (x,y,z), ~
# define BOOST_PARAMETER_FOR_EACH_head_aux4(x,y,z,u) (x,y,z,u), ~
# define BOOST_PARAMETER_FOR_EACH_head(n,x) \
BOOST_PP_SPLIT(0, BOOST_PP_CAT(BOOST_PARAMETER_FOR_EACH_head_aux,n) x)
# define BOOST_PARAMETER_FOR_EACH_pred_aux_BOOST_PARAMETER_FOR_EACH_END_SENTINEL
# define BOOST_PARAMETER_FOR_EACH_pred_aux_check(x) \
BOOST_PP_NOT(BOOST_PP_IS_EMPTY( \
BOOST_PP_CAT(BOOST_PARAMETER_FOR_EACH_pred_aux_, x) \
)), ~
# define BOOST_PARAMETER_FOR_EACH_pred_aux2(x,y) \
BOOST_PARAMETER_FOR_EACH_pred_aux_check(x)
# define BOOST_PARAMETER_FOR_EACH_pred_aux3(x,y,z) \
BOOST_PARAMETER_FOR_EACH_pred_aux_check(x)
# define BOOST_PARAMETER_FOR_EACH_pred_aux4(x,y,z,u) \
BOOST_PARAMETER_FOR_EACH_pred_aux_check(x)
# define BOOST_PARAMETER_FOR_EACH_pred_aux0(n,x) \
BOOST_PP_CAT(BOOST_PARAMETER_FOR_EACH_pred_aux,n) x
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
# define BOOST_PARAMETER_FOR_EACH_pred_SPLIT_FIRST(x) \
BOOST_PP_SPLIT(0, x)
# define BOOST_PARAMETER_FOR_EACH_pred(r, state) \
BOOST_PARAMETER_FOR_EACH_pred_SPLIT_FIRST( \
BOOST_PARAMETER_FOR_EACH_pred_aux0( \
BOOST_PP_TUPLE_ELEM(5,3,state) \
, BOOST_PP_TUPLE_ELEM(5,0,state) \
) \
)
# else
# define BOOST_PARAMETER_FOR_EACH_pred(r, state) \
BOOST_PP_SPLIT( \
0 \
, BOOST_PARAMETER_FOR_EACH_pred_aux0( \
BOOST_PP_TUPLE_ELEM(5,3,state) \
, BOOST_PP_TUPLE_ELEM(5,0,state) \
) \
)
# endif
# define BOOST_PARAMETER_FOR_EACH_op(r, state) \
( \
BOOST_PP_TUPLE_EAT(BOOST_PP_TUPLE_ELEM(5,3,state)) \
BOOST_PP_TUPLE_ELEM(5,0,state) \
, BOOST_PP_TUPLE_ELEM(5,1,state) \
, BOOST_PP_TUPLE_ELEM(5,2,state) \
, BOOST_PP_TUPLE_ELEM(5,3,state) \
, BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(5,4,state)) \
)
# define BOOST_PARAMETER_FOR_EACH_macro(r, state) \
BOOST_PP_TUPLE_ELEM(5,2,state)( \
r \
, BOOST_PP_TUPLE_ELEM(5,4,state) \
, BOOST_PARAMETER_FOR_EACH_head( \
BOOST_PP_TUPLE_ELEM(5,3,state) \
, BOOST_PP_TUPLE_ELEM(5,0,state) \
) \
, BOOST_PP_TUPLE_ELEM(5,1,state) \
)
# define BOOST_PARAMETER_FOR_EACH_build_end_sentinel(z,n,text) \
BOOST_PP_COMMA_IF(n) BOOST_PARAMETER_FOR_EACH_END_SENTINEL
# define BOOST_PARAMETER_FOR_EACH_build_end_sentinel_tuple(arity) \
( \
BOOST_PP_REPEAT(arity, BOOST_PARAMETER_FOR_EACH_build_end_sentinel, _) \
)
# define BOOST_PARAMETER_FOR_EACH_R(r, arity, list, data, macro) \
BOOST_PP_CAT(BOOST_PP_FOR_, r)( \
(list BOOST_PARAMETER_FOR_EACH_build_end_sentinel_tuple(arity), data, macro, arity, 0) \
, BOOST_PARAMETER_FOR_EACH_pred \
, BOOST_PARAMETER_FOR_EACH_op \
, BOOST_PARAMETER_FOR_EACH_macro \
)
# define BOOST_PARAMETER_FOR_EACH(arity, list, data, macro) \
BOOST_PARAMETER_FOR_EACH_R(BOOST_PP_DEDUCE_R(), arity, list, data, macro)
#endif // BOOST_PARAMETER_FOR_EACH_051217_HPP

View File

@ -0,0 +1,36 @@
// Copyright David Abrahams 2005. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_PARAMETER_AUX_RESULT_OF0_DWA2005511_HPP
# define BOOST_PARAMETER_AUX_RESULT_OF0_DWA2005511_HPP
# include <boost/utility/result_of.hpp>
// A metafunction returning the result of invoking a nullary function
// object of the given type.
#ifndef BOOST_NO_RESULT_OF
# include <boost/utility/result_of.hpp>
namespace boost { namespace parameter { namespace aux {
template <class F>
struct result_of0 : result_of<F()>
{};
}}} // namespace boost::parameter::aux_
#else
namespace boost { namespace parameter { namespace aux {
template <class F>
struct result_of0
{
typedef typename F::result_type type;
};
}}} // namespace boost::parameter::aux_
#endif
#endif // BOOST_PARAMETER_AUX_RESULT_OF0_DWA2005511_HPP

View File

@ -0,0 +1,66 @@
// Copyright Daniel Wallin 2006. 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)
#ifndef BOOST_PARAMETER_SET_060912_HPP
# define BOOST_PARAMETER_SET_060912_HPP
# include <boost/detail/workaround.hpp>
# if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
# include <boost/mpl/insert.hpp>
# include <boost/mpl/set/set0.hpp>
# include <boost/mpl/has_key.hpp>
namespace boost { namespace parameter { namespace aux {
typedef mpl::set0<> set0;
template <class Set, class K>
struct insert_
{
typedef typename mpl::insert<Set, K>::type type;
};
template <class Set, class K>
struct has_key_
{
typedef typename mpl::has_key<Set, K>::type type;
};
}}} // namespace boost::parameter::aux
# else
# include <boost/mpl/list.hpp>
# include <boost/mpl/end.hpp>
# include <boost/mpl/find.hpp>
# include <boost/mpl/not.hpp>
# include <boost/mpl/push_front.hpp>
namespace boost { namespace parameter { namespace aux {
typedef mpl::list0<> set0;
template <class Set, class K>
struct insert_
{
typedef typename mpl::push_front<Set, K>::type type;
};
template <class Set, class K>
struct has_key_
{
typedef typename mpl::find<Set, K>::type iter;
typedef mpl::not_<
is_same<iter, typename mpl::end<Set>::type>
> type;
};
}}} // namespace boost::parameter::aux
# endif
#endif // BOOST_PARAMETER_SET_060912_HPP

38
3rdparty/boost/boost/parameter/aux_/tag.hpp vendored Executable file
View File

@ -0,0 +1,38 @@
// Copyright David Abrahams 2005. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_PARAMETER_AUX_TAG_DWA2005610_HPP
# define BOOST_PARAMETER_AUX_TAG_DWA2005610_HPP
# include <boost/parameter/aux_/unwrap_cv_reference.hpp>
# include <boost/parameter/aux_/tagged_argument.hpp>
namespace boost { namespace parameter { namespace aux {
template <class Keyword, class ActualArg
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
, class = typename is_cv_reference_wrapper<ActualArg>::type
#endif
>
struct tag
{
typedef tagged_argument<
Keyword
, typename unwrap_cv_reference<ActualArg>::type
> type;
};
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
template <class Keyword, class ActualArg>
struct tag<Keyword,ActualArg,mpl::false_>
{
typedef tagged_argument<
Keyword
, ActualArg
> type;
};
#endif
}}} // namespace boost::parameter::aux_
#endif // BOOST_PARAMETER_AUX_TAG_DWA2005610_HPP

View File

@ -0,0 +1,188 @@
// Copyright Daniel Wallin, David Abrahams 2005. 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)
#ifndef BOOST_PARAMETER_TAGGED_ARGUMENT_050328_HPP
# define BOOST_PARAMETER_TAGGED_ARGUMENT_050328_HPP
# include <boost/parameter/aux_/void.hpp>
# include <boost/parameter/aux_/arg_list.hpp>
# include <boost/parameter/aux_/result_of0.hpp>
# include <boost/mpl/if.hpp>
# include <boost/mpl/apply_wrap.hpp>
# include <boost/mpl/and.hpp>
# include <boost/mpl/not.hpp>
# include <boost/type_traits/is_same.hpp>
# include <boost/type_traits/is_convertible.hpp>
# include <boost/type_traits/is_reference.hpp>
namespace boost { namespace parameter { namespace aux {
struct empty_arg_list;
struct arg_list_tag;
struct tagged_argument_base {};
// Holds a reference to an argument of type Arg associated with
// keyword Keyword
template <class Keyword, class Arg>
struct tagged_argument : tagged_argument_base
{
typedef Keyword key_type;
typedef Arg value_type;
typedef Arg& reference;
tagged_argument(reference x) : value(x) {}
// A metafunction class that, given a keyword and a default
// type, returns the appropriate result type for a keyword
// lookup given that default
struct binding
{
template <class KW, class Default, class Reference>
struct apply
{
typedef typename mpl::eval_if<
boost::is_same<KW, key_type>
, mpl::if_<Reference, reference, value_type>
, mpl::identity<Default>
>::type type;
};
};
// Comma operator to compose argument list without using parameters<>.
// Useful for argument lists with undetermined length.
template <class Keyword2, class Arg2>
arg_list<
tagged_argument<Keyword, Arg>
, arg_list<tagged_argument<Keyword2, Arg2> >
>
operator,(tagged_argument<Keyword2, Arg2> x) const
{
return arg_list<
tagged_argument<Keyword, Arg>
, arg_list<tagged_argument<Keyword2, Arg2> >
>(
*this
, arg_list<tagged_argument<Keyword2, Arg2> >(x, empty_arg_list())
);
}
reference operator[](keyword<Keyword> const&) const
{
return value;
}
# if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
template <class KW, class Default>
Default& get_with_default(default_<KW,Default> const& x, int) const
{
return x.value;
}
template <class Default>
reference get_with_default(default_<key_type,Default> const&, long) const
{
return value;
}
template <class KW, class Default>
typename mpl::apply_wrap3<binding, KW, Default&, mpl::true_>::type
operator[](default_<KW,Default> const& x) const
{
return get_with_default(x, 0L);
}
template <class KW, class F>
typename result_of0<F>::type
get_with_lazy_default(lazy_default<KW,F> const& x, int) const
{
return x.compute_default();
}
template <class F>
reference get_with_lazy_default(lazy_default<key_type,F> const&, long) const
{
return value;
}
template <class KW, class F>
typename mpl::apply_wrap3<
binding,KW
, typename result_of0<F>::type
, mpl::true_
>::type
operator[](lazy_default<KW,F> const& x) const
{
return get_with_lazy_default(x, 0L);
}
# else
template <class Default>
reference operator[](default_<key_type,Default> const& ) const
{
return value;
}
template <class F>
reference operator[](lazy_default<key_type,F> const& ) const
{
return value;
}
template <class KW, class Default>
Default& operator[](default_<KW,Default> const& x) const
{
return x.value;
}
template <class KW, class F>
typename result_of0<F>::type operator[](lazy_default<KW,F> const& x) const
{
return x.compute_default();
}
template <class ParameterRequirements>
static typename ParameterRequirements::has_default
satisfies(ParameterRequirements*);
template <class HasDefault, class Predicate>
static typename mpl::apply1<Predicate, value_type>::type
satisfies(
parameter_requirements<key_type,Predicate,HasDefault>*
);
# endif
reference value;
# if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
// warning suppression
private:
void operator=(tagged_argument const&);
public:
# endif
// MPL sequence support
typedef tagged_argument type; // Convenience for users
typedef empty_arg_list tail_type; // For the benefit of iterators
typedef arg_list_tag tag; // For dispatching to sequence intrinsics
};
// Defines a metafunction, is_tagged_argument, that identifies
// tagged_argument specializations and their derived classes.
template <class T>
struct is_tagged_argument_aux
: is_convertible<T*,tagged_argument_base const*>
{};
template <class T>
struct is_tagged_argument
: mpl::and_<
mpl::not_<is_reference<T> >
, is_tagged_argument_aux<T>
>
{};
}}} // namespace boost::parameter::aux
#endif // BOOST_PARAMETER_TAGGED_ARGUMENT_050328_HPP

View File

@ -0,0 +1,47 @@
// Copyright Daniel Wallin 2006. 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)
#ifndef BOOST_PARAMETER_TEMPLATE_KEYWORD_060203_HPP
# define BOOST_PARAMETER_TEMPLATE_KEYWORD_060203_HPP
# include <boost/mpl/and.hpp>
# include <boost/mpl/not.hpp>
# include <boost/type_traits/is_convertible.hpp>
# include <boost/type_traits/is_reference.hpp>
namespace boost { namespace parameter {
namespace aux
{
struct template_keyword_tag {};
template <class T, class U>
struct is_pointer_convertible
: is_convertible<T*, U*>
{};
template <class T>
struct is_template_keyword
: mpl::and_<
mpl::not_<is_reference<T> >
, is_pointer_convertible<T, template_keyword_tag>
>
{};
} // namespace aux
template <class Tag, class T>
struct template_keyword
: aux::template_keyword_tag
{
typedef Tag key_type;
typedef T value_type;
typedef value_type reference;
};
}} // namespace boost::parameter
#endif // BOOST_PARAMETER_TEMPLATE_KEYWORD_060203_HPP

View File

@ -0,0 +1,91 @@
// Copyright Daniel Wallin, David Abrahams 2005. 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)
#ifndef UNWRAP_CV_REFERENCE_050328_HPP
#define UNWRAP_CV_REFERENCE_050328_HPP
#include <boost/parameter/aux_/yesno.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/eval_if.hpp>
namespace boost { template<class T> class reference_wrapper; }
namespace boost { namespace parameter { namespace aux {
//
// reference_wrapper support -- because of the forwarding problem,
// when passing arguments positionally by non-const reference, we
// ask users of named parameter interfaces to use ref(x) to wrap
// them.
//
// is_cv_reference_wrapper returns mpl::true_ if T is of type
// reference_wrapper<U> cv
template <class U>
yes_tag is_cv_reference_wrapper_check(reference_wrapper<U> const volatile*);
no_tag is_cv_reference_wrapper_check(...);
template <class T>
struct is_cv_reference_wrapper
{
BOOST_STATIC_CONSTANT(
bool, value = (
sizeof(is_cv_reference_wrapper_check((T*)0)) == sizeof(yes_tag)
)
);
typedef mpl::bool_<
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
is_cv_reference_wrapper::
#endif
value> type;
};
// Needed for unwrap_cv_reference below. T might be const, so
// eval_if might fail because of deriving from T const on EDG.
template <class T>
struct get_type
{
typedef typename T::type type;
};
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
template <class T, class is_reference_wrapper = typename is_cv_reference_wrapper<T>::type>
struct unwrap_cv_reference
{
typedef T type;
};
template <class T>
struct unwrap_cv_reference<T const, mpl::false_>
{
typedef T const type;
};
template <class T>
struct unwrap_cv_reference<T, mpl::true_>
: T
{};
#else
// Produces the unwrapped type to hold a reference to in named<>
// Can't use boost::unwrap_reference<> here because it
// doesn't handle the case where T = reference_wrapper<U> cv
template <class T>
struct unwrap_cv_reference
{
typedef typename mpl::eval_if<
is_cv_reference_wrapper<T>
, get_type<T>
, mpl::identity<T>
>::type type;
};
#endif
}}} // namespace boost::parameter::aux
#endif // UNWRAP_CV_REFERENCE_050328_HPP

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