mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-04 07:14:30 +02:00
Bring MPL v2 to the main trunk
[SVN r15347]
This commit is contained in:
41
include/boost/mpl/O1_size.hpp
Normal file
41
include/boost/mpl/O1_size.hpp
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/O1_size.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_O1_SIZE_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_O1_SIZE_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/O1_size_fwd.hpp"
|
||||||
|
#include "boost/mpl/aux_/O1_size_impl.hpp"
|
||||||
|
#include "boost/mpl/aux_/sequence_tag.hpp"
|
||||||
|
#include "boost/mpl/aux_/void_spec.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
// returns sequence size if it's an O(1) operation; otherwise returns -1
|
||||||
|
template< typename Sequence >
|
||||||
|
struct O1_size
|
||||||
|
: O1_size_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) >
|
||||||
|
::template algorithm< Sequence >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_VOID_SPEC(1, O1_size)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_O1_SIZE_HPP_INCLUDED
|
29
include/boost/mpl/O1_size_fwd.hpp
Normal file
29
include/boost/mpl/O1_size_fwd.hpp
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/O1_size_fwd.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template< typename Tag > struct O1_size_traits;
|
||||||
|
template< typename Sequence > struct O1_size;
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
|
179
include/boost/mpl/advance.hpp
Normal file
179
include/boost/mpl/advance.hpp
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/advance.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ADVANCE_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ADVANCE_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/arithmetic/negate.hpp"
|
||||||
|
#include "boost/mpl/comparison/less.hpp"
|
||||||
|
#include "boost/mpl/integral_c.hpp"
|
||||||
|
#include "boost/mpl/if.hpp"
|
||||||
|
#include "boost/mpl/iterator_tag.hpp"
|
||||||
|
#include "boost/mpl/aux_/advance_forward.hpp"
|
||||||
|
#include "boost/mpl/aux_/advance_backward.hpp"
|
||||||
|
#include "boost/mpl/aux_/iterator_category.hpp"
|
||||||
|
#include "boost/mpl/aux_/iterator_names.hpp"
|
||||||
|
#include "boost/mpl/aux_/msvc_never_true.hpp"
|
||||||
|
#include "boost/mpl/aux_/apply.hpp"
|
||||||
|
#include "boost/mpl/aux_/void_spec.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
// forward/bidirectional iterators
|
||||||
|
template< typename Category, typename Iterator, typename N >
|
||||||
|
struct advance_impl
|
||||||
|
{
|
||||||
|
typedef typename if_<
|
||||||
|
typename less< N,integral_c<long,0> >::type
|
||||||
|
, aux::advance_backward< ::boost::mpl::negate<N>::value >
|
||||||
|
, aux::advance_forward< BOOST_MPL_AUX_VALUE_WKND(N)::value >
|
||||||
|
>::type algo_;
|
||||||
|
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY1(algo_,Iterator)::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// random-access iterators
|
||||||
|
template< typename Iterator, typename N >
|
||||||
|
struct advance_impl<ra_iter_tag_,Iterator,N>
|
||||||
|
{
|
||||||
|
typedef typename Iterator
|
||||||
|
::template BOOST_MPL_AUX_ITERATOR_ADVANCE<N>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Iterator)
|
||||||
|
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(N)
|
||||||
|
>
|
||||||
|
struct advance
|
||||||
|
{
|
||||||
|
typedef typename aux::advance_impl<
|
||||||
|
typename BOOST_MPL_AUX_ITERATOR_CATEGORY(Iterator)
|
||||||
|
, Iterator
|
||||||
|
, N
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Iterator
|
||||||
|
, long N
|
||||||
|
>
|
||||||
|
struct advance_c
|
||||||
|
{
|
||||||
|
typedef typename aux::advance_impl<
|
||||||
|
typename BOOST_MPL_AUX_ITERATOR_CATEGORY(Iterator)
|
||||||
|
, Iterator
|
||||||
|
, integral_c<long,N>
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
#else // no partial specialization
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
// forward/bidirectional iterators
|
||||||
|
template< typename Category >
|
||||||
|
struct advance_impl
|
||||||
|
{
|
||||||
|
template< typename Iterator, typename N > struct result_
|
||||||
|
{
|
||||||
|
enum { n = N::value }; // MSVC 7.x workaround
|
||||||
|
typedef typename if_c<
|
||||||
|
(n < 0)
|
||||||
|
, aux::advance_backward<(-n)>
|
||||||
|
, aux::advance_forward<n>
|
||||||
|
>::type algo_;
|
||||||
|
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY1(algo_,Iterator)::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// random-access iterators
|
||||||
|
|
||||||
|
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
|
||||||
|
|
||||||
|
// msvc_advance
|
||||||
|
#define BOOST_MPL_AUX_MSVC_DTW_NAME msvc_advance
|
||||||
|
#define BOOST_MPL_AUX_MSVC_DTW_ORIGINAL_NAME BOOST_MPL_AUX_ITERATOR_ADVANCE
|
||||||
|
#define BOOST_MPL_AUX_MSVC_DTW_ARITY 1
|
||||||
|
#include "boost/mpl/aux_/msvc_dtw.hpp"
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct advance_impl<ra_iter_tag_>
|
||||||
|
{
|
||||||
|
template< typename Iterator, typename N > struct result_
|
||||||
|
{
|
||||||
|
typedef typename msvc_advance<Iterator>
|
||||||
|
::template result_<N>::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
template<>
|
||||||
|
struct advance_impl<ra_iter_tag_>
|
||||||
|
{
|
||||||
|
template< typename Iterator, typename N > struct result_
|
||||||
|
{
|
||||||
|
typedef typename Iterator
|
||||||
|
::template BOOST_MPL_AUX_ITERATOR_ADVANCE<N>::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Iterator)
|
||||||
|
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(N)
|
||||||
|
>
|
||||||
|
struct advance
|
||||||
|
{
|
||||||
|
typedef typename BOOST_MPL_AUX_ITERATOR_CATEGORY(Iterator) tag_;
|
||||||
|
typedef typename aux::advance_impl<tag_>
|
||||||
|
::template result_<
|
||||||
|
Iterator
|
||||||
|
, N
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Iterator
|
||||||
|
, long N
|
||||||
|
>
|
||||||
|
struct advance_c
|
||||||
|
{
|
||||||
|
typedef typename BOOST_MPL_AUX_ITERATOR_CATEGORY(Iterator) tag_;
|
||||||
|
typedef typename aux::advance_impl<tag_>
|
||||||
|
::template result_<
|
||||||
|
Iterator
|
||||||
|
, integral_c<long,N>
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_VOID_SPEC(2, advance)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_ADVANCE_HPP_INCLUDED
|
24
include/boost/mpl/alias.hpp
Normal file
24
include/boost/mpl/alias.hpp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/alias.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ALIAS_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ALIAS_HPP_INCLUDED
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
namespace mpl = boost::mpl;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_ALIAS_HPP_INCLUDED
|
61
include/boost/mpl/always.hpp
Normal file
61
include/boost/mpl/always.hpp
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/always.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ALWAYS_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ALWAYS_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/preprocessor/def_params_tail.hpp"
|
||||||
|
#include "boost/mpl/limits/arity.hpp"
|
||||||
|
#include "boost/mpl/void.hpp"
|
||||||
|
#include "boost/mpl/aux_/arity.hpp"
|
||||||
|
#include "boost/mpl/aux_/lambda_spec.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/dtp.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template< typename Value >
|
||||||
|
struct always
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
BOOST_MPL_PP_DEF_PARAMS_TAIL(1, typename T)
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
typedef Value type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
|
||||||
|
namespace aux {
|
||||||
|
template< int N, typename T >
|
||||||
|
struct arity< always<T>, N >
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(int
|
||||||
|
, value = BOOST_MPL_METAFUNCTION_MAX_ARITY
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,always)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_ALWAYS_HPP_INCLUDED
|
64
include/boost/mpl/apply_if.hpp
Normal file
64
include/boost/mpl/apply_if.hpp
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost/mpl/apply_if.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_APPLY_IF_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_APPLY_IF_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/if.hpp"
|
||||||
|
#include "boost/mpl/aux_/apply.hpp"
|
||||||
|
#include "boost/mpl/aux_/void_spec.hpp"
|
||||||
|
#include "boost/mpl/aux_/lambda_support.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(C)
|
||||||
|
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(F1)
|
||||||
|
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(F2)
|
||||||
|
>
|
||||||
|
struct apply_if
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef typename if_<C,F1,F2>::type nullary_func_;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY0(nullary_func_)::type type;
|
||||||
|
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,apply_if,(C,F1,F2))
|
||||||
|
};
|
||||||
|
|
||||||
|
// (almost) copy & paste in order to save one more
|
||||||
|
// recursively nested template instantiation to user
|
||||||
|
template<
|
||||||
|
bool C
|
||||||
|
, typename F1
|
||||||
|
, typename F2
|
||||||
|
>
|
||||||
|
struct apply_if_c
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef typename if_c<C,F1,F2>::type nullary_func_;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY0(nullary_func_)::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_VOID_SPEC(3, apply_if)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_APPLY_IF_HPP_INCLUDED
|
138
include/boost/mpl/arg.hpp
Normal file
138
include/boost/mpl/arg.hpp
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/arg.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Peter Dimov, Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#if !defined(BOOST_PP_IS_ITERATING)
|
||||||
|
|
||||||
|
///// header body
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ARG_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ARG_HPP_INCLUDED
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include "boost/mpl/arg_fwd.hpp"
|
||||||
|
# include "boost/mpl/void.hpp"
|
||||||
|
# include "boost/mpl/aux_/arity.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
|
||||||
|
!defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER arg.hpp
|
||||||
|
# include "boost/mpl/aux_/include_preprocessed.hpp"
|
||||||
|
|
||||||
|
#else
|
||||||
|
# include "boost/mpl/limits/arity.hpp"
|
||||||
|
# include "boost/mpl/aux_/preprocessor/default_params.hpp"
|
||||||
|
# include "boost/mpl/aux_/preprocessor/params.hpp"
|
||||||
|
# include "boost/mpl/aux_/config/lambda_support.hpp"
|
||||||
|
|
||||||
|
# include "boost/preprocessor/iterate.hpp"
|
||||||
|
# include "boost/preprocessor/inc.hpp"
|
||||||
|
# include "boost/preprocessor/cat.hpp"
|
||||||
|
# include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
// local macro, #undef-ined at the end of the header
|
||||||
|
# define AUX_ARG_N_DEFAULT_PARAMS(param,value) \
|
||||||
|
BOOST_MPL_PP_DEFAULT_PARAMS( \
|
||||||
|
BOOST_MPL_METAFUNCTION_MAX_ARITY \
|
||||||
|
, param \
|
||||||
|
, value \
|
||||||
|
) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
#define BOOST_PP_ITERATION_PARAMS_1 \
|
||||||
|
(3,(0, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/arg.hpp"))
|
||||||
|
#include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
|
||||||
|
# undef AUX_ARG_N_DEFAULT_PARAMS
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
|
||||||
|
// MWCW/Borland workaround
|
||||||
|
namespace aux {
|
||||||
|
template< int N, int A >
|
||||||
|
struct arity< arg<N>, A >
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(int
|
||||||
|
, value = BOOST_MPL_METAFUNCTION_MAX_ARITY
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
|
||||||
|
#endif // BOOST_MPL_ARG_HPP_INCLUDED
|
||||||
|
|
||||||
|
///// iteration
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define i BOOST_PP_FRAME_ITERATION(1)
|
||||||
|
|
||||||
|
#if i > 0
|
||||||
|
|
||||||
|
template<> struct arg<i>
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(int, value = i);
|
||||||
|
typedef arg<BOOST_PP_INC(i)> next;
|
||||||
|
#if defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)
|
||||||
|
typedef void_ tag;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
template<
|
||||||
|
AUX_ARG_N_DEFAULT_PARAMS(typename U, void_)
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
typedef BOOST_PP_CAT(U,i) type;
|
||||||
|
typedef char arity_constraint[
|
||||||
|
::boost::mpl::aux::reject_if_void_<type>::value
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
template<> struct arg<-1>
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(int, value = -1);
|
||||||
|
#if defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)
|
||||||
|
typedef void_ tag;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
template<
|
||||||
|
AUX_ARG_N_DEFAULT_PARAMS(typename U, void_)
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
typedef U1 type;
|
||||||
|
typedef char arity_constraint[
|
||||||
|
::boost::mpl::aux::reject_if_void_<type>::value
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // i > 0
|
||||||
|
|
||||||
|
#undef i
|
||||||
|
#endif // BOOST_PP_IS_ITERATING
|
28
include/boost/mpl/arg_fwd.hpp
Normal file
28
include/boost/mpl/arg_fwd.hpp
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/arg_fwd.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Peter Dimov, Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ARG_FWD_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ARG_FWD_HPP_INCLUDED
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template< int N > struct arg;
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_ARG_FWD_HPP_INCLUDED
|
27
include/boost/mpl/arithmetic.hpp
Normal file
27
include/boost/mpl/arithmetic.hpp
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/arithmetic.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ARITHMETIC_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ARITHMETIC_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/arithmetic/plus.hpp"
|
||||||
|
#include "boost/mpl/arithmetic/minus.hpp"
|
||||||
|
#include "boost/mpl/arithmetic/multiplies.hpp"
|
||||||
|
#include "boost/mpl/arithmetic/divides.hpp"
|
||||||
|
#include "boost/mpl/arithmetic/modulus.hpp"
|
||||||
|
#include "boost/mpl/arithmetic/negate.hpp"
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_ARITHMETIC_HPP_INCLUDED
|
76
include/boost/mpl/arithmetic/divides.hpp
Normal file
76
include/boost/mpl/arithmetic/divides.hpp
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/arithmetic/divides.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000/02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ARITHMETIC_DIVIDES_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ARITHMETIC_DIVIDES_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/integral_c.hpp"
|
||||||
|
#include "boost/mpl/aux_/typeof.hpp"
|
||||||
|
#include "boost/mpl/aux_/value_wknd.hpp"
|
||||||
|
#include "boost/mpl/aux_/void_spec.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/eti.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T, T N1, T N2, T N3 = 1, T N4 = 1, T N5 = 1
|
||||||
|
>
|
||||||
|
struct divides_c
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(T, value = (N1 / N2 / N3 / N4 / N5));
|
||||||
|
#if !defined(__BORLANDC__)
|
||||||
|
typedef integral_c<T,value> type;
|
||||||
|
#else
|
||||||
|
typedef integral_c<T,(N1 / N2 / N3 / N4 / N5)> type;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_MSVC_ETI_BUG)
|
||||||
|
template<>
|
||||||
|
struct divides_c<long,0,0,0,0,0>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1)
|
||||||
|
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2)
|
||||||
|
, typename T3 = integral_c<int,1>
|
||||||
|
, typename T4 = integral_c<int,1>
|
||||||
|
, typename T5 = integral_c<int,1>
|
||||||
|
>
|
||||||
|
struct divides
|
||||||
|
: divides_c<
|
||||||
|
BOOST_MPL_AUX_TYPEOF(T1,
|
||||||
|
T1::value / T2::value / T3::value / T4::value / T5::value
|
||||||
|
)
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T1)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T2)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T3)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T4)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T5)::value
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,divides)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_ARITHMETIC_DIVIDES_HPP_INCLUDED
|
68
include/boost/mpl/arithmetic/minus.hpp
Normal file
68
include/boost/mpl/arithmetic/minus.hpp
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/arithmetic/minus.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ARITHMETIC_MINUS_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ARITHMETIC_MINUS_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/integral_c.hpp"
|
||||||
|
#include "boost/mpl/aux_/typeof.hpp"
|
||||||
|
#include "boost/mpl/aux_/value_wknd.hpp"
|
||||||
|
#include "boost/mpl/aux_/void_spec.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T, T N1, T N2, T N3 = 0, T N4 = 0, T N5 = 0
|
||||||
|
>
|
||||||
|
struct minus_c
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(T, value = (N1 - N2 - N3 - N4 - N5));
|
||||||
|
#if !defined(__BORLANDC__)
|
||||||
|
typedef integral_c<T,value> type;
|
||||||
|
#else
|
||||||
|
typedef integral_c<T,(N1 - N2 - N3 - N4 - N5)> type;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1)
|
||||||
|
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2)
|
||||||
|
, typename T3 = integral_c<int,0>
|
||||||
|
, typename T4 = integral_c<int,0>
|
||||||
|
, typename T5 = integral_c<int,0>
|
||||||
|
>
|
||||||
|
struct minus
|
||||||
|
: minus_c<
|
||||||
|
BOOST_MPL_AUX_TYPEOF(T1,
|
||||||
|
T1::value - T2::value - T3::value - T4::value - T5::value
|
||||||
|
)
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T1)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T2)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T3)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T4)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T5)::value
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,minus)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_ARITHMETIC_MINUS_HPP_INCLUDED
|
70
include/boost/mpl/arithmetic/modulus.hpp
Normal file
70
include/boost/mpl/arithmetic/modulus.hpp
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/arithmetic/modulus.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2111%12
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ARITHMETIC_MODULUS_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ARITHMETIC_MODULUS_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/integral_c.hpp"
|
||||||
|
#include "boost/mpl/aux_/typeof.hpp"
|
||||||
|
#include "boost/mpl/aux_/value_wknd.hpp"
|
||||||
|
#include "boost/mpl/aux_/void_spec.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/eti.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T, T N1, T N2
|
||||||
|
>
|
||||||
|
struct modulus_c
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(T, value = (N1 % N2));
|
||||||
|
#if !defined(__BORLANDC__)
|
||||||
|
typedef integral_c<T,value> type;
|
||||||
|
#else
|
||||||
|
typedef integral_c<T,(N1 % N2)> type;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_MSVC_ETI_BUG)
|
||||||
|
template<>
|
||||||
|
struct modulus_c<long,0,0>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1)
|
||||||
|
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2)
|
||||||
|
>
|
||||||
|
struct modulus
|
||||||
|
: modulus_c<
|
||||||
|
BOOST_MPL_AUX_TYPEOF(T1,
|
||||||
|
T1::value % T2::value
|
||||||
|
)
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T1)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T2)::value
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_VOID_SPEC(2,modulus)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_ARITHMETIC_MODULUS_HPP_INCLUDED
|
68
include/boost/mpl/arithmetic/multiplies.hpp
Normal file
68
include/boost/mpl/arithmetic/multiplies.hpp
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/arithmetic/multiplies.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ARITHMETIC_MULTIPLIES_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ARITHMETIC_MULTIPLIES_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/integral_c.hpp"
|
||||||
|
#include "boost/mpl/aux_/typeof.hpp"
|
||||||
|
#include "boost/mpl/aux_/value_wknd.hpp"
|
||||||
|
#include "boost/mpl/aux_/void_spec.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T, T N1, T N2, T N3 = 1, T N4 = 1, T N5 = 1
|
||||||
|
>
|
||||||
|
struct multiplies_c
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(T, value = (N1 * N2 * N3 * N4 * N5));
|
||||||
|
#if !defined(__BORLANDC__)
|
||||||
|
typedef integral_c<T,value> type;
|
||||||
|
#else
|
||||||
|
typedef integral_c<T,(N1 * N2 * N3 * N4 * N5)> type;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1)
|
||||||
|
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2)
|
||||||
|
, typename T3 = integral_c<int,1>
|
||||||
|
, typename T4 = integral_c<int,1>
|
||||||
|
, typename T5 = integral_c<int,1>
|
||||||
|
>
|
||||||
|
struct multiplies
|
||||||
|
: multiplies_c<
|
||||||
|
BOOST_MPL_AUX_TYPEOF(T1,
|
||||||
|
T1::value * T2::value * T3::value * T4::value * T5::value
|
||||||
|
)
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T1)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T2)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T3)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T4)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T5)::value
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,multiplies)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_ARITHMETIC_MULTIPLIES_HPP_INCLUDED
|
47
include/boost/mpl/arithmetic/negate.hpp
Normal file
47
include/boost/mpl/arithmetic/negate.hpp
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/arithmetic/negate.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ARITHMETIC_NEGATE_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ARITHMETIC_NEGATE_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/integral_c.hpp"
|
||||||
|
#include "boost/mpl/aux_/typeof.hpp"
|
||||||
|
#include "boost/mpl/aux_/void_spec.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T)
|
||||||
|
>
|
||||||
|
struct negate
|
||||||
|
{
|
||||||
|
typedef BOOST_MPL_AUX_TYPEOF(T,T::value) value_type;
|
||||||
|
BOOST_STATIC_CONSTANT(value_type, value = (-T::value));
|
||||||
|
#if !defined(__BORLANDC__)
|
||||||
|
typedef integral_c<value_type, value> type;
|
||||||
|
#else
|
||||||
|
typedef integral_c<value_type, (-T::value)> type;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_VOID_SPEC(1,negate)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_ARITHMETIC_NEGATE_HPP_INCLUDED
|
68
include/boost/mpl/arithmetic/plus.hpp
Normal file
68
include/boost/mpl/arithmetic/plus.hpp
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/arithmetic/plus.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ARITHMETIC_PLUS_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ARITHMETIC_PLUS_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/integral_c.hpp"
|
||||||
|
#include "boost/mpl/aux_/typeof.hpp"
|
||||||
|
#include "boost/mpl/aux_/value_wknd.hpp"
|
||||||
|
#include "boost/mpl/aux_/void_spec.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T, T N1, T N2, T N3 = 0, T N4 = 0, T N5 = 0
|
||||||
|
>
|
||||||
|
struct plus_c
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(T, value = (N1 + N2 + N3 + N4 + N5));
|
||||||
|
#if !defined(__BORLANDC__)
|
||||||
|
typedef integral_c<T,value> type;
|
||||||
|
#else
|
||||||
|
typedef integral_c<T,(N1 + N2 + N3 + N4 + N5)> type;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1)
|
||||||
|
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2)
|
||||||
|
, typename T3 = integral_c<int,0>
|
||||||
|
, typename T4 = integral_c<int,0>
|
||||||
|
, typename T5 = integral_c<int,0>
|
||||||
|
>
|
||||||
|
struct plus
|
||||||
|
: plus_c<
|
||||||
|
BOOST_MPL_AUX_TYPEOF(T1,
|
||||||
|
T1::value + T2::value + T3::value + T4::value + T5::value
|
||||||
|
)
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T1)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T2)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T3)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T4)::value
|
||||||
|
, BOOST_MPL_AUX_VALUE_WKND(T5)::value
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,plus)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_ARITHMETIC_PLUS_HPP_INCLUDED
|
46
include/boost/mpl/assert_is_same.hpp
Normal file
46
include/boost/mpl/assert_is_same.hpp
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/assert_is_same.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ASSERT_IS_SAME_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ASSERT_IS_SAME_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/static_assert.hpp"
|
||||||
|
#include "boost/type_traits/same_traits.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
// the following macros are shortcuts for some often-used but verbose forms
|
||||||
|
// of static asserts
|
||||||
|
|
||||||
|
// tokenization takes place before macro expansion (see 2.1 [lex.phases]
|
||||||
|
// para 3-4), so, strictly speaking, spaces between '<', 'type1', and
|
||||||
|
// 'type2', '>' tokens below are not required; they are needed in practice,
|
||||||
|
// though, because there is at least one compiler (MSVC 6.5) that does not
|
||||||
|
// conform to the standard here
|
||||||
|
|
||||||
|
#define BOOST_MPL_ASSERT_IS_SAME(type1, type2) \
|
||||||
|
BOOST_STATIC_ASSERT((::boost::is_same< type1, type2 >::value)) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
#define BOOST_MPL_ASSERT_NOT_SAME(type1, type2) \
|
||||||
|
BOOST_STATIC_ASSERT(!(::boost::is_same< type1, type2 >::value)) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_ASSERT_IS_SAME_HPP_INCLUDED
|
56
include/boost/mpl/at.hpp
Normal file
56
include/boost/mpl/at.hpp
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/at.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AT_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AT_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/at_fwd.hpp"
|
||||||
|
#include "boost/mpl/integral_c.hpp"
|
||||||
|
#include "boost/mpl/aux_/at_impl.hpp"
|
||||||
|
#include "boost/mpl/aux_/sequence_tag.hpp"
|
||||||
|
#include "boost/mpl/aux_/void_spec.hpp"
|
||||||
|
#include "boost/mpl/aux_/lambda_support.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(N)
|
||||||
|
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence)
|
||||||
|
>
|
||||||
|
struct at
|
||||||
|
: at_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) >
|
||||||
|
::template algorithm< N,Sequence >
|
||||||
|
{
|
||||||
|
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,at,(N,Sequence))
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename Sequence
|
||||||
|
>
|
||||||
|
struct at_c
|
||||||
|
: at_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) >
|
||||||
|
::template algorithm< integral_c<long,N>,Sequence >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_VOID_SPEC(2, at)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AT_HPP_INCLUDED
|
29
include/boost/mpl/at_fwd.hpp
Normal file
29
include/boost/mpl/at_fwd.hpp
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/at_fwd.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AT_FWD_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AT_FWD_HPP_INCLUDED
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template< typename Tag > struct at_traits;
|
||||||
|
template< typename N, typename Sequence > struct at;
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AT_FWD_HPP_INCLUDED
|
72
include/boost/mpl/aux_/O1_size_impl.hpp
Normal file
72
include/boost/mpl/aux_/O1_size_impl.hpp
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/O1_size_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/O1_size_fwd.hpp"
|
||||||
|
#include "boost/mpl/integral_c.hpp"
|
||||||
|
#include "boost/mpl/if.hpp"
|
||||||
|
#include "boost/mpl/aux_/has_size.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
// default implementation - returns |Sequence::size| if sequence has a |size|
|
||||||
|
// member, and -1 otherwise; conrete sequences might override it by specializing
|
||||||
|
// either the |O1_size_traits| or the primary |O1_size| template
|
||||||
|
|
||||||
|
#if 0//!defined(BOOST_MSVC) || BOOST_MSVC > 1300
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template< typename Sequence >
|
||||||
|
struct O1_size_impl
|
||||||
|
: Sequence::size
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template< typename Tag >
|
||||||
|
struct O1_size_traits
|
||||||
|
{
|
||||||
|
template< typename Sequence > struct algorithm
|
||||||
|
: if_c<
|
||||||
|
::boost::mpl::aux::has_size<Sequence>::value
|
||||||
|
, aux::O1_size_impl<Sequence>
|
||||||
|
, integral_c<long,-1>
|
||||||
|
>::type
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
|
||||||
|
template< typename Tag >
|
||||||
|
struct O1_size_traits
|
||||||
|
{
|
||||||
|
template< typename Sequence > struct algorithm
|
||||||
|
: integral_c<long,-1>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BOOST_MSVC > 1300
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED
|
118
include/boost/mpl/aux_/advance_backward.hpp
Normal file
118
include/boost/mpl/aux_/advance_backward.hpp
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/advance_backward.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#if !defined(BOOST_PP_IS_ITERATING)
|
||||||
|
|
||||||
|
///// header body
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_ADVANCE_BACKWARD_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_ADVANCE_BACKWARD_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/apply.hpp"
|
||||||
|
#include "boost/mpl/aux_/prior.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/eti.hpp"
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
|
||||||
|
!defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER advance_backward.hpp
|
||||||
|
# include "boost/mpl/aux_/include_preprocessed.hpp"
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include "boost/mpl/limits/unrolling.hpp"
|
||||||
|
# include "boost/preprocessor/iterate.hpp"
|
||||||
|
# include "boost/preprocessor/cat.hpp"
|
||||||
|
# include "boost/preprocessor/inc.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
// forward declaration
|
||||||
|
template< long N > struct advance_backward;
|
||||||
|
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||||
|
(3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/advance_backward.hpp"))
|
||||||
|
# include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
template< long N >
|
||||||
|
struct advance_backward
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY1(
|
||||||
|
advance_backward<BOOST_MPL_UNROLLING_LIMIT>
|
||||||
|
, Iterator
|
||||||
|
)::type chunk_result_;
|
||||||
|
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY1(
|
||||||
|
advance_backward<(
|
||||||
|
(N - BOOST_MPL_UNROLLING_LIMIT) < 0
|
||||||
|
? 0
|
||||||
|
: N - BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
)>
|
||||||
|
, chunk_result_
|
||||||
|
)::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
|
||||||
|
#endif // BOOST_MPL_AUX_ADVANCE_BACKWARD_HPP_INCLUDED
|
||||||
|
|
||||||
|
///// iteration, depth == 1
|
||||||
|
|
||||||
|
#elif BOOST_PP_ITERATION_DEPTH() == 1
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct advance_backward< BOOST_PP_FRAME_ITERATION(1) >
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef Iterator iter0;
|
||||||
|
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_2 \
|
||||||
|
(3,(1, BOOST_PP_FRAME_ITERATION(1), "boost/mpl/aux_/advance_backward.hpp"))
|
||||||
|
# include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) type;
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_MSVC_ETI_BUG)
|
||||||
|
template<> struct apply<int> { typedef int type; };
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
///// iteration, depth == 2
|
||||||
|
|
||||||
|
#elif BOOST_PP_ITERATION_DEPTH() == 2
|
||||||
|
|
||||||
|
# define AUX_ITER_0 BOOST_PP_CAT(iter,BOOST_PP_DEC(BOOST_PP_FRAME_ITERATION(2)))
|
||||||
|
# define AUX_ITER_1 BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(2))
|
||||||
|
|
||||||
|
typedef typename BOOST_MPL_AUX_PRIOR(AUX_ITER_0) AUX_ITER_1;
|
||||||
|
|
||||||
|
# undef AUX_ITER_1
|
||||||
|
# undef AUX_ITER_0
|
||||||
|
|
||||||
|
#endif // BOOST_PP_IS_ITERATING
|
118
include/boost/mpl/aux_/advance_forward.hpp
Normal file
118
include/boost/mpl/aux_/advance_forward.hpp
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/advance_forward.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#if !defined(BOOST_PP_IS_ITERATING)
|
||||||
|
|
||||||
|
///// header body
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/apply.hpp"
|
||||||
|
#include "boost/mpl/aux_/next.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/eti.hpp"
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
|
||||||
|
!defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER advance_forward.hpp
|
||||||
|
# include "boost/mpl/aux_/include_preprocessed.hpp"
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include "boost/mpl/limits/unrolling.hpp"
|
||||||
|
# include "boost/preprocessor/iterate.hpp"
|
||||||
|
# include "boost/preprocessor/cat.hpp"
|
||||||
|
# include "boost/preprocessor/inc.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
// forward declaration
|
||||||
|
template< long N > struct advance_forward;
|
||||||
|
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||||
|
(3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/advance_forward.hpp"))
|
||||||
|
# include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
template< long N >
|
||||||
|
struct advance_forward
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY1(
|
||||||
|
advance_forward<BOOST_MPL_UNROLLING_LIMIT>
|
||||||
|
, Iterator
|
||||||
|
)::type chunk_result_;
|
||||||
|
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY1(
|
||||||
|
advance_forward<(
|
||||||
|
(N - BOOST_MPL_UNROLLING_LIMIT) < 0
|
||||||
|
? 0
|
||||||
|
: N - BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
)>
|
||||||
|
, chunk_result_
|
||||||
|
)::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
|
||||||
|
#endif // BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
|
||||||
|
|
||||||
|
///// iteration, depth == 1
|
||||||
|
|
||||||
|
#elif BOOST_PP_ITERATION_DEPTH() == 1
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct advance_forward< BOOST_PP_FRAME_ITERATION(1) >
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef Iterator iter0;
|
||||||
|
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_2 \
|
||||||
|
(3,(1, BOOST_PP_FRAME_ITERATION(1), "boost/mpl/aux_/advance_forward.hpp"))
|
||||||
|
# include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) type;
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_MSVC_ETI_BUG)
|
||||||
|
template<> struct apply<int> { typedef int type; };
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
///// iteration, depth == 2
|
||||||
|
|
||||||
|
#elif BOOST_PP_ITERATION_DEPTH() == 2
|
||||||
|
|
||||||
|
# define AUX_ITER_0 BOOST_PP_CAT(iter,BOOST_PP_DEC(BOOST_PP_FRAME_ITERATION(2)))
|
||||||
|
# define AUX_ITER_1 BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(2))
|
||||||
|
|
||||||
|
typedef typename BOOST_MPL_AUX_NEXT(AUX_ITER_0) AUX_ITER_1;
|
||||||
|
|
||||||
|
# undef AUX_ITER_1
|
||||||
|
# undef AUX_ITER_0
|
||||||
|
|
||||||
|
#endif // BOOST_PP_IS_ITERATING
|
66
include/boost/mpl/aux_/apply.hpp
Normal file
66
include/boost/mpl/aux_/apply.hpp
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/apply.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_APPLY_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_APPLY_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/dtp.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
#define BOOST_MPL_AUX_APPLY(arity, args) \
|
||||||
|
BOOST_PP_CAT(BOOST_MPL_AUX_APPLY,arity) args \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_USE_APPLY_INTERNALLY) \
|
||||||
|
|| defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \
|
||||||
|
|| (defined(BOOST_MSVC) && (BOOST_MSVC < 1300))
|
||||||
|
|
||||||
|
# if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include "boost/mpl/apply.hpp"
|
||||||
|
# endif
|
||||||
|
|
||||||
|
// tokenization takes place before macro expansion (see 2.1 [lex.phases]
|
||||||
|
// para 3-4), so, strictly speaking, spaces between '<', 'f', and '>' tokens
|
||||||
|
// below (BOOST_MPL_AUX_APPLY0) are not required; they are needed in practice,
|
||||||
|
// though, because there is at least one compiler (MSVC 6.5) that does not
|
||||||
|
// conform to the standard here
|
||||||
|
# define BOOST_MPL_AUX_APPLY0(f) apply0< f >
|
||||||
|
# define BOOST_MPL_AUX_APPLY1(f,a1) apply1<f,a1>
|
||||||
|
# define BOOST_MPL_AUX_APPLY2(f,a1,a2) apply2<f,a1,a2>
|
||||||
|
# define BOOST_MPL_AUX_APPLY3(f,a1,a2,a3) apply3<f,a1,a2,a3>
|
||||||
|
# define BOOST_MPL_AUX_APPLY4(f,a1,a2,a3,a4) apply4<f,a1,a2,a3,a4>
|
||||||
|
# define BOOST_MPL_AUX_APPLY5(f,a1,a2,a3,a4,a5) apply5<f,a1,a2,a3,a4,a5>
|
||||||
|
# define BOOST_MPL_AUX_APPLY6(f,a1,a2,a3,a4,a5,a6) apply6<f,a1,a2,a3,a4,a5,a6>
|
||||||
|
# define BOOST_MPL_AUX_APPLY7(f,a1,a2,a3,a4,a5,a6,a7) apply7<f,a1,a2,a3,a4,a5,a6,a7>
|
||||||
|
# define BOOST_MPL_AUX_APPLY8(f,a1,a2,a3,a4,a5,a6,a7,a8) apply8<f,a1,a2,a3,a4,a5,a6,a7,a8>
|
||||||
|
# define BOOST_MPL_AUX_APPLY9(f,a1,a2,a3,a4,a5,a6,a7,a8,a9) apply9<f,a1,a2,a3,a4,a5,a6,a7,a8,a9>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_APPLY0(f) f
|
||||||
|
# define BOOST_MPL_AUX_APPLY1(f,a1) f::template apply<a1>
|
||||||
|
# define BOOST_MPL_AUX_APPLY2(f,a1,a2) f::template apply<a1,a2>
|
||||||
|
# define BOOST_MPL_AUX_APPLY3(f,a1,a2,a3) f::template apply<a1,a2,a3>
|
||||||
|
# define BOOST_MPL_AUX_APPLY4(f,a1,a2,a3,a4) f::template apply<a1,a2,a3,a4>
|
||||||
|
# define BOOST_MPL_AUX_APPLY5(f,a1,a2,a3,a4,a5) f::template apply<a1,a2,a3,a4,a5>
|
||||||
|
# define BOOST_MPL_AUX_APPLY6(f,a1,a2,a3,a4,a5,a6) f::template apply<a1,a2,a3,a4,a5,a6>
|
||||||
|
# define BOOST_MPL_AUX_APPLY7(f,a1,a2,a3,a4,a5,a6,a7) f::template apply<a1,a2,a3,a4,a5,a6,a7>
|
||||||
|
# define BOOST_MPL_AUX_APPLY8(f,a1,a2,a3,a4,a5,a6,a7,a8) f::template apply<a1,a2,a3,a4,a5,a6,a7,a8>
|
||||||
|
# define BOOST_MPL_AUX_APPLY9(f,a1,a2,a3,a4,a5,a6,a7,a8,a9) f::template apply<a1,a2,a3,a4,a5,a6,a7,a8,a9>
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_APPLY_HPP_INCLUDED
|
42
include/boost/mpl/aux_/apply_1st.hpp
Normal file
42
include/boost/mpl/aux_/apply_1st.hpp
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/apply_1st.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_APPLY_1ST_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_APPLY_1ST_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/apply.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
struct apply_1st
|
||||||
|
{
|
||||||
|
template< typename Pair, typename T > struct apply
|
||||||
|
: apply2<
|
||||||
|
typename Pair::first
|
||||||
|
, typename Pair::second
|
||||||
|
, T
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_APPLY_1ST_HPP_INCLUDED
|
45
include/boost/mpl/aux_/arity.hpp
Normal file
45
include/boost/mpl/aux_/arity.hpp
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/arity.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_ARITY_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_ARITY_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/dtp.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
|
||||||
|
|
||||||
|
# include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
// agurt, 15/mar/02: it's possible to implement the template so that it will
|
||||||
|
// "just work" and do not require any specialization, but not on the compilers
|
||||||
|
// that require the arity workaround in the first place
|
||||||
|
template< typename F, int N >
|
||||||
|
struct arity
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(int, value = N);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_ARITY_HPP_INCLUDED
|
50
include/boost/mpl/aux_/at_impl.hpp
Normal file
50
include/boost/mpl/aux_/at_impl.hpp
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/at_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/begin_end.hpp"
|
||||||
|
#include "boost/mpl/advance.hpp"
|
||||||
|
#include "boost/mpl/aux_/deref_wknd.hpp"
|
||||||
|
#include "boost/mpl/aux_/traits_lambda_spec.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
// default implementation; conrete sequences might override it by
|
||||||
|
// specializing either the |at_traits| or the primary |at| template
|
||||||
|
|
||||||
|
template< typename Tag >
|
||||||
|
struct at_traits
|
||||||
|
{
|
||||||
|
template< typename N, typename Sequence > struct algorithm
|
||||||
|
{
|
||||||
|
typedef typename advance<
|
||||||
|
typename begin<Sequence>::type
|
||||||
|
, N
|
||||||
|
>::type iter_;
|
||||||
|
|
||||||
|
typedef typename BOOST_MPL_AUX_DEREF_WNKD(iter_) type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,at_traits)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED
|
53
include/boost/mpl/aux_/back_impl.hpp
Normal file
53
include/boost/mpl/aux_/back_impl.hpp
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/back_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_BACK_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_BACK_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/begin_end.hpp"
|
||||||
|
#include "boost/mpl/prior.hpp"
|
||||||
|
#include "boost/mpl/aux_/deref_wknd.hpp"
|
||||||
|
#include "boost/mpl/aux_/traits_lambda_spec.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
// default implementation, requires at least bi-directional iterators;
|
||||||
|
// conrete sequences might override it by specializing either the
|
||||||
|
// |back_traits| or the primary |back| template
|
||||||
|
|
||||||
|
template< typename Tag >
|
||||||
|
struct back_traits
|
||||||
|
{
|
||||||
|
template< typename Sequence > struct algorithm
|
||||||
|
{
|
||||||
|
typedef typename end<Sequence>::type iter_;
|
||||||
|
#if !defined(BOOST_MSVC) || BOOST_MSVC > 1200
|
||||||
|
typedef typename iter_::prior last_;
|
||||||
|
#else
|
||||||
|
typedef typename prior<iter_>::type last_;
|
||||||
|
#endif
|
||||||
|
typedef typename BOOST_MPL_AUX_DEREF_WNKD(last_) type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,back_traits)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_BACK_IMPL_HPP_INCLUDED
|
73
include/boost/mpl/aux_/begin_end_impl.hpp
Normal file
73
include/boost/mpl/aux_/begin_end_impl.hpp
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/begin_end_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/begin_end_fwd.hpp"
|
||||||
|
#include "boost/mpl/aux_/traits_lambda_spec.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/eti.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
// default implementation; conrete sequences might override it by
|
||||||
|
// specializing either the |begin_traits/end_traits| or the primary
|
||||||
|
// |begin/end| templates
|
||||||
|
|
||||||
|
template< typename Tag >
|
||||||
|
struct begin_traits
|
||||||
|
{
|
||||||
|
template< typename Sequence > struct algorithm
|
||||||
|
{
|
||||||
|
typedef typename Sequence::begin type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template< typename Tag >
|
||||||
|
struct end_traits
|
||||||
|
{
|
||||||
|
template< typename Sequence > struct algorithm
|
||||||
|
{
|
||||||
|
typedef typename Sequence::end type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_MSVC_ETI_BUG)
|
||||||
|
template<> struct begin_traits<int>
|
||||||
|
{
|
||||||
|
template< typename Sequence > struct algorithm
|
||||||
|
{
|
||||||
|
typedef int type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct end_traits<int>
|
||||||
|
{
|
||||||
|
template< typename Sequence > struct algorithm
|
||||||
|
{
|
||||||
|
typedef int type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,begin_traits)
|
||||||
|
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,end_traits)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED
|
48
include/boost/mpl/aux_/bool_value_wknd.hpp
Normal file
48
include/boost/mpl/aux_/bool_value_wknd.hpp
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/bool_value_wknd.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_BOOL_VALUE_WKND_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_BOOL_VALUE_WKND_HPP_INCLUDED
|
||||||
|
|
||||||
|
#if defined(__BORLANDC__) || defined(BOOST_MSVC) && BOOST_MSVC < 1300
|
||||||
|
|
||||||
|
# include "boost/mpl/bool_c.hpp"
|
||||||
|
|
||||||
|
namespace boost { namespace mpl { namespace aux {
|
||||||
|
|
||||||
|
template< typename C >
|
||||||
|
struct bool_value_wknd
|
||||||
|
: C
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct bool_value_wknd<int>
|
||||||
|
: false_c
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
}}} // namespace boost::mpl::aux
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_BOOL_VALUE_WKND(C) ::boost::mpl::aux::bool_value_wknd<C>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_BOOL_VALUE_WKND(C) C
|
||||||
|
|
||||||
|
#endif // __BORLANDC__
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_BOOL_VALUE_WKND_HPP_INCLUDED
|
39
include/boost/mpl/aux_/clear_impl.hpp
Normal file
39
include/boost/mpl/aux_/clear_impl.hpp
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/clear_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/clear_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 clear_traits
|
||||||
|
{
|
||||||
|
template< typename Sequence > struct algorithm;
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,clear_traits)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED
|
13
include/boost/mpl/aux_/config/bind.hpp
Normal file
13
include/boost/mpl/aux_/config/bind.hpp
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
// Copyright David Abrahams 2002. Permission to copy, use,
|
||||||
|
// modify, sell and distribute this software is granted provided this
|
||||||
|
// copyright notice appears in all copies. This software is provided
|
||||||
|
// "as is" without express or implied warranty, and with no claim as
|
||||||
|
// to its suitability for any purpose.
|
||||||
|
#ifndef BIND_DWA2002910_HPP
|
||||||
|
# define BIND_DWA2002910_HPP
|
||||||
|
|
||||||
|
# include <boost/config.hpp>
|
||||||
|
# if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
|
||||||
|
# define BOOST_MPL_NO_BIND_TEMPLATE
|
||||||
|
# endif
|
||||||
|
#endif // BIND_DWA2002910_HPP
|
41
include/boost/mpl/aux_/config/compiler.hpp
Normal file
41
include/boost/mpl/aux_/config/compiler.hpp
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/config/dtp.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/dtp.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
|
||||||
|
# define BOOST_MPL_COMPILER_CLASS msvc60
|
||||||
|
#elif defined(BOOST_MSVC) && BOOST_MSVC == 1300
|
||||||
|
# define BOOST_MPL_COMPILER_CLASS msvc70
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
# define BOOST_MPL_COMPILER_CLASS gcc
|
||||||
|
#elif defined(__BORLANDC__)
|
||||||
|
# define BOOST_MPL_COMPILER_CLASS bcc
|
||||||
|
#elif defined(__MWERKS__) && __MWERKS__ <= 0x3001
|
||||||
|
# define BOOST_MPL_COMPILER_CLASS mwcw
|
||||||
|
#elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
|
# define BOOST_MPL_COMPILER_CLASS no_ctps
|
||||||
|
#else
|
||||||
|
# define BOOST_MPL_COMPILER_CLASS plain
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define BOOST_MPL_COMPILER_DIR BOOST_MPL_COMPILER_CLASS/
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED
|
30
include/boost/mpl/aux_/config/dependent_nttp.hpp
Normal file
30
include/boost/mpl/aux_/config/dependent_nttp.hpp
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/config/dependent_nttp.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED
|
||||||
|
|
||||||
|
// GCC and EDG-based compilers incorrectly reject the following code:
|
||||||
|
// template< typename T, T n > struct a;
|
||||||
|
// template< typename T > struct b;
|
||||||
|
// template< typename T, T n > struct b< a<T,n> > {};
|
||||||
|
|
||||||
|
#if defined(__EDG__) \
|
||||||
|
|| defined(__GNUC__)
|
||||||
|
# define BOOST_NO_DEPENDENT_NON_TYPE_PARAMETER_IN_PARTIAL_SPECIALIZATION
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED
|
29
include/boost/mpl/aux_/config/dtp.hpp
Normal file
29
include/boost/mpl/aux_/config/dtp.hpp
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/config/dtp.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED
|
||||||
|
|
||||||
|
// MWCW 7.x-8.0 "losts" default template parameters of nested class
|
||||||
|
// templates when their owner classes are passed as arguments to other
|
||||||
|
// templates; Borland "forgets" them from the very beginning (if the owner
|
||||||
|
// class is a class template).
|
||||||
|
#if defined(__MWERKS__) && __MWERKS__ <= 0x3001 \
|
||||||
|
|| defined(__BORLANDC__) && __BORLANDC__ <= 0x551
|
||||||
|
# define BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED
|
27
include/boost/mpl/aux_/config/eti.hpp
Normal file
27
include/boost/mpl/aux_/config/eti.hpp
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/config/eti.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
// flag for MSVC 6.5's so-called "early template instantiation bug"
|
||||||
|
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
|
||||||
|
# define BOOST_MPL_MSVC_ETI_BUG
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED
|
26
include/boost/mpl/aux_/config/internals.hpp
Normal file
26
include/boost/mpl/aux_/config/internals.hpp
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/config/use_preprocessed.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_CONFIG_INTERNALS_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_CONFIG_INTERNALS_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
|
||||||
|
# define BOOST_MPL_INTERNALS_USE_ITERATOR_CATEGORY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CONFIG_INTERNALS_HPP_INCLUDED
|
33
include/boost/mpl/aux_/config/lambda_support.hpp
Normal file
33
include/boost/mpl/aux_/config/lambda_support.hpp
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/config/lambda_support.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_CONFIG_LAMBDA_SUPPORT_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_CONFIG_LAMBDA_SUPPORT_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/ttp.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
// agurt, 15/jan/02: full-fledged implementation requires both
|
||||||
|
// template template parameters _and_ partial specialization
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS) \
|
||||||
|
|| defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
|
# define BOOST_MPL_NO_FULL_LAMBDA_SUPPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//#define BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CONFIG_LAMBDA_SUPPORT_HPP_INCLUDED
|
28
include/boost/mpl/aux_/config/msvc_typename.hpp
Normal file
28
include/boost/mpl/aux_/config/msvc_typename.hpp
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/config/msvc_typename.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
|
||||||
|
# define BOOST_MSVC_TYPENAME
|
||||||
|
#else
|
||||||
|
# define BOOST_MSVC_TYPENAME typename
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED
|
24
include/boost/mpl/aux_/config/overload_resolution.hpp
Normal file
24
include/boost/mpl/aux_/config/overload_resolution.hpp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/config/overload_resolution.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
|
||||||
|
|
||||||
|
#if defined(__BORLANDC__) || defined(__MWERKS__) && __MWERKS__ < 0x3001
|
||||||
|
# define BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
|
30
include/boost/mpl/aux_/config/ttp.hpp
Normal file
30
include/boost/mpl/aux_/config/ttp.hpp
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/config/ttp.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_TEMPLATE_TEMPLATES)
|
||||||
|
# define BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
|
||||||
|
# define BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED
|
22
include/boost/mpl/aux_/config/use_preprocessed.hpp
Normal file
22
include/boost/mpl/aux_/config/use_preprocessed.hpp
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/config/use_preprocessed.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED
|
||||||
|
|
||||||
|
#define BOOST_MPL_USE_PREPROCESSED_HEADERS
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED
|
28
include/boost/mpl/aux_/config/vector.hpp
Normal file
28
include/boost/mpl/aux_/config/vector.hpp
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/config/vector.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_CONFIG_VECTOR_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_CONFIG_VECTOR_HPP_INCLUDED
|
||||||
|
|
||||||
|
// agurt, 10/jul/02: full-fledged __typeof is needed to permit the optimal
|
||||||
|
// vector implementation
|
||||||
|
|
||||||
|
#if defined(__MWERKS__) && __MWERKS__ >= 0x3001 \
|
||||||
|
&& !defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL)
|
||||||
|
# define BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CONFIG_VECTOR_HPP_INCLUDED
|
53
include/boost/mpl/aux_/copy_if_op.hpp
Normal file
53
include/boost/mpl/aux_/copy_if_op.hpp
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/copy_if_op.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_COPY_IF_OP_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_COPY_IF_OP_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/identity.hpp"
|
||||||
|
#include "boost/mpl/apply.hpp"
|
||||||
|
#include "boost/mpl/apply_if.hpp"
|
||||||
|
#include "boost/mpl/aux_/lambda_spec.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Operation
|
||||||
|
, typename Predicate
|
||||||
|
>
|
||||||
|
struct copy_if_op
|
||||||
|
{
|
||||||
|
template< typename Sequence, typename T > struct apply
|
||||||
|
{
|
||||||
|
typedef typename apply_if<
|
||||||
|
typename apply1<Predicate,T>::type
|
||||||
|
, apply2<Operation,Sequence,T>
|
||||||
|
, identity<Sequence>
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(2,aux::copy_if_op)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_COPY_IF_OP_HPP_INCLUDED
|
50
include/boost/mpl/aux_/copy_op.hpp
Normal file
50
include/boost/mpl/aux_/copy_op.hpp
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/copy_op.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_COPY_OP_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_COPY_OP_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/apply.hpp"
|
||||||
|
#include "boost/mpl/aux_/lambda_spec.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
// hand-written version is more efficient than bind/lambda expression
|
||||||
|
template<
|
||||||
|
typename Operation
|
||||||
|
>
|
||||||
|
struct copy_op
|
||||||
|
{
|
||||||
|
template< typename Sequence, typename T > struct apply
|
||||||
|
{
|
||||||
|
typedef typename apply2<
|
||||||
|
Operation
|
||||||
|
, Sequence
|
||||||
|
, T
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,aux::copy_op)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_COPY_OP_HPP_INCLUDED
|
103
include/boost/mpl/aux_/count_args.hpp
Normal file
103
include/boost/mpl/aux_/count_args.hpp
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/count_args.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
// no include guards, the header is intended for multiple inclusion!
|
||||||
|
|
||||||
|
#include "boost/preprocessor/expr_if.hpp"
|
||||||
|
#include "boost/preprocessor/inc.hpp"
|
||||||
|
#include "boost/preprocessor/cat.hpp"
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM)
|
||||||
|
# define BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM typename T
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// local macros, #undef-ined at the end of the header
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_AUX_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES)
|
||||||
|
|
||||||
|
# include "boost/mpl/aux_/preprocessor/repeat.hpp"
|
||||||
|
# include "boost/mpl/aux_/preprocessor/params.hpp"
|
||||||
|
|
||||||
|
# define AUX_COUNT_ARGS_REPEAT BOOST_MPL_PP_REPEAT
|
||||||
|
# define AUX_COUNT_ARGS_PARAMS(param) \
|
||||||
|
BOOST_MPL_PP_PARAMS( \
|
||||||
|
BOOST_MPL_AUX_COUNT_ARGS_ARITY \
|
||||||
|
, param \
|
||||||
|
) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include "boost/preprocessor/enum_shifted_params.hpp"
|
||||||
|
# include "boost/preprocessor/repeat.hpp"
|
||||||
|
# include "boost/preprocessor/inc.hpp"
|
||||||
|
|
||||||
|
# define AUX_COUNT_ARGS_REPEAT BOOST_PP_REPEAT_1ST
|
||||||
|
# define AUX_COUNT_ARGS_PARAMS(param) \
|
||||||
|
BOOST_PP_ENUM_SHIFTED_PARAMS( \
|
||||||
|
BOOST_PP_INC(BOOST_MPL_AUX_COUNT_ARGS_ARITY) \
|
||||||
|
, param \
|
||||||
|
) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES
|
||||||
|
|
||||||
|
|
||||||
|
#define AUX_IS_ARG_TEMPLATE_NAME \
|
||||||
|
BOOST_PP_CAT(is_,BOOST_PP_CAT(BOOST_MPL_AUX_COUNT_ARGS_PREFIX,_arg)) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
#define AUX_COUNT_ARGS_FUNC(unused, i, param) \
|
||||||
|
BOOST_PP_EXPR_IF(i, +) \
|
||||||
|
AUX_IS_ARG_TEMPLATE_NAME<BOOST_PP_CAT(param,BOOST_PP_INC(i))>::value \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
// is_<xxx>_arg
|
||||||
|
template< BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM >
|
||||||
|
struct AUX_IS_ARG_TEMPLATE_NAME
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct AUX_IS_ARG_TEMPLATE_NAME<BOOST_MPL_AUX_COUNT_ARGS_DEFAULT>
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||||
|
};
|
||||||
|
|
||||||
|
// <xxx>_count_args
|
||||||
|
template<
|
||||||
|
AUX_COUNT_ARGS_PARAMS(BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM)
|
||||||
|
>
|
||||||
|
struct BOOST_PP_CAT(BOOST_MPL_AUX_COUNT_ARGS_PREFIX,_count_args)
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(int, value = AUX_COUNT_ARGS_REPEAT(
|
||||||
|
BOOST_MPL_AUX_COUNT_ARGS_ARITY
|
||||||
|
, AUX_COUNT_ARGS_FUNC
|
||||||
|
, T
|
||||||
|
));
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef AUX_COUNT_ARGS_FUNC
|
||||||
|
#undef AUX_IS_ARG_TEMPLATE_NAME
|
||||||
|
#undef AUX_COUNT_ARGS_PARAMS
|
||||||
|
#undef AUX_COUNT_ARGS_REPEAT
|
||||||
|
|
||||||
|
#undef BOOST_MPL_AUX_COUNT_ARGS_ARITY
|
||||||
|
#undef BOOST_MPL_AUX_COUNT_ARGS_DEFAULT
|
||||||
|
#undef BOOST_MPL_AUX_COUNT_ARGS_PREFIX
|
||||||
|
#undef BOOST_MPL_AUX_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES
|
||||||
|
#undef BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM
|
39
include/boost/mpl/aux_/debug_print.hpp
Normal file
39
include/boost/mpl/aux_/debug_print.hpp
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/debug_print.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Fernando Cacciola, Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_DEBUG_PRINT_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_DEBUG_PRINT_HPP_INCLUDED
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
struct print_
|
||||||
|
{
|
||||||
|
enum { value = T::not_existing_memeber };
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#define BOOST_MPL_AUX_DEBUG_PRINT(type) \
|
||||||
|
bool const mpl_debug_print_##type \
|
||||||
|
= boost::mpl::aux::print_<type>::value \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_DEBUG_PRINT_HPP_INCLUDED
|
47
include/boost/mpl/aux_/deref_wknd.hpp
Normal file
47
include/boost/mpl/aux_/deref_wknd.hpp
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/deref_wknd.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_DEREF_WNKD_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_DEREF_WNKD_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/eti.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_MSVC_ETI_BUG)
|
||||||
|
|
||||||
|
namespace boost { namespace mpl { namespace aux {
|
||||||
|
|
||||||
|
template< typename Iterator >
|
||||||
|
struct deref_wknd
|
||||||
|
{
|
||||||
|
typedef typename Iterator::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct deref_wknd<int>
|
||||||
|
{
|
||||||
|
typedef deref_wknd type;
|
||||||
|
};
|
||||||
|
|
||||||
|
}}} // namespace boost::mpl::aux
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_DEREF_WNKD(iter) aux::deref_wknd<iter>::type
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_DEREF_WNKD(iter) iter::type
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_DEREF_WNKD_HPP_INCLUDED
|
48
include/boost/mpl/aux_/empty_impl.hpp
Normal file
48
include/boost/mpl/aux_/empty_impl.hpp
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/empty_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#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_traits| or the primary |empty| template
|
||||||
|
|
||||||
|
template< typename Tag >
|
||||||
|
struct empty_traits
|
||||||
|
{
|
||||||
|
template< typename Sequence > struct algorithm
|
||||||
|
: is_same<
|
||||||
|
typename begin<Sequence>::type
|
||||||
|
, typename end<Sequence>::type
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,empty_traits)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED
|
74
include/boost/mpl/aux_/erase_impl.hpp
Normal file
74
include/boost/mpl/aux_/erase_impl.hpp
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/erase_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/clear.hpp"
|
||||||
|
#include "boost/mpl/push_front.hpp"
|
||||||
|
#include "boost/mpl/copy_backward.hpp"
|
||||||
|
#include "boost/mpl/iterator_range.hpp"
|
||||||
|
#include "boost/mpl/aux_/void_spec.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
// default implementation; conrete sequences might override it by
|
||||||
|
// specializing either the |erase_traits| or the primary |erase| template
|
||||||
|
|
||||||
|
template< typename Tag >
|
||||||
|
struct erase_traits
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename Sequence
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
>
|
||||||
|
struct algorithm
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// 1st half: [begin, first)
|
||||||
|
typedef iterator_range<
|
||||||
|
typename begin<Sequence>::type
|
||||||
|
, First
|
||||||
|
> first_half_;
|
||||||
|
|
||||||
|
// 2nd half: [last, end) ... that is, [last + 1, end)
|
||||||
|
typedef iterator_range<
|
||||||
|
Last
|
||||||
|
, typename end<Sequence>::type
|
||||||
|
> second_half_;
|
||||||
|
|
||||||
|
typedef typename copy_backward<
|
||||||
|
second_half_
|
||||||
|
, typename clear<Sequence>::type
|
||||||
|
, push_front<_,_>
|
||||||
|
>::type half_sequence_;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename copy_backward<
|
||||||
|
first_half_
|
||||||
|
, half_sequence_
|
||||||
|
, push_front<_,_>
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED
|
46
include/boost/mpl/aux_/fold_backward_impl.hpp
Normal file
46
include/boost/mpl/aux_/fold_backward_impl.hpp
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/fold_backward_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_FOLD_BACKWARD_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_FOLD_BACKWARD_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/apply.hpp"
|
||||||
|
#include "boost/mpl/aux_/next.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/eti.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && \
|
||||||
|
!defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include "boost/mpl/if.hpp"
|
||||||
|
# include "boost/type_traits/is_same.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
|
||||||
|
!defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER fold_backward_impl.hpp
|
||||||
|
# include "boost/mpl/aux_/include_preprocessed.hpp"
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_FOLD_IMPL_OP(iter) typename iter::type
|
||||||
|
# define BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX fold_backward
|
||||||
|
# include "boost/mpl/aux_/fold_backward_impl_body.hpp"
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
|
||||||
|
#endif // BOOST_MPL_AUX_FOLD_BACKWARD_IMPL_HPP_INCLUDED
|
406
include/boost/mpl/aux_/fold_backward_impl_body.hpp
Normal file
406
include/boost/mpl/aux_/fold_backward_impl_body.hpp
Normal file
@@ -0,0 +1,406 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/fold_backward_impl_body.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
// no include guards, the header is intended for multiple inclusion!
|
||||||
|
|
||||||
|
#if !defined(BOOST_PP_IS_ITERATING)
|
||||||
|
|
||||||
|
# include "boost/mpl/aux_/apply.hpp"
|
||||||
|
# include "boost/mpl/aux_/next.hpp"
|
||||||
|
# include "boost/config.hpp"
|
||||||
|
|
||||||
|
# include "boost/mpl/limits/unrolling.hpp"
|
||||||
|
# include "boost/mpl/aux_/preprocessor/repeat.hpp"
|
||||||
|
|
||||||
|
# include "boost/preprocessor/arithmetic/sub.hpp"
|
||||||
|
# include "boost/preprocessor/iterate.hpp"
|
||||||
|
# include "boost/preprocessor/dec.hpp"
|
||||||
|
# include "boost/preprocessor/inc.hpp"
|
||||||
|
# include "boost/preprocessor/cat.hpp"
|
||||||
|
|
||||||
|
// local macros, #undef-ined at the end of the header
|
||||||
|
|
||||||
|
# define AUX_ITER_FOLD_FORWARD_STEP(i, unused) \
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY2( \
|
||||||
|
ForwardOp \
|
||||||
|
, BOOST_PP_CAT(fwd_state,i) \
|
||||||
|
, BOOST_MPL_AUX_FOLD_IMPL_OP(BOOST_PP_CAT(iter,i)) \
|
||||||
|
)::type BOOST_PP_CAT(fwd_state,BOOST_PP_INC(i)); \
|
||||||
|
typedef typename BOOST_MPL_AUX_NEXT(BOOST_PP_CAT(iter,i)) \
|
||||||
|
BOOST_PP_CAT(iter,BOOST_PP_INC(i)); \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_ITER_FOLD_BACKWARD_STEP_FUNC(i) \
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY2( \
|
||||||
|
BackwardOp \
|
||||||
|
, BOOST_PP_CAT(bkwd_state,i) \
|
||||||
|
, BOOST_MPL_AUX_FOLD_IMPL_OP(BOOST_PP_CAT(iter,BOOST_PP_DEC(i))) \
|
||||||
|
)::type BOOST_PP_CAT(bkwd_state,BOOST_PP_DEC(i)); \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_ITER_FOLD_BACKWARD_STEP(i, j) \
|
||||||
|
AUX_ITER_FOLD_BACKWARD_STEP_FUNC( \
|
||||||
|
BOOST_PP_SUB_D(1,j,i) \
|
||||||
|
) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_FIRST_BACKWARD_STATE_TYPEDEF(i) \
|
||||||
|
typedef typename nested_chunk::state BOOST_PP_CAT(bkwd_state,i);
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_FOLD_IMPL_NAME \
|
||||||
|
BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_impl) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_FOLD_CHUNK_NAME \
|
||||||
|
BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_chunk) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
//: forward declaration
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct AUX_FOLD_IMPL_NAME;
|
||||||
|
|
||||||
|
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
|
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||||
|
(3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/fold_backward_impl_body.hpp"))
|
||||||
|
# include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct AUX_FOLD_IMPL_NAME
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
|
||||||
|
BOOST_MPL_PP_REPEAT(
|
||||||
|
BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
, AUX_ITER_FOLD_FORWARD_STEP
|
||||||
|
, unused
|
||||||
|
)
|
||||||
|
|
||||||
|
typedef AUX_FOLD_IMPL_NAME<
|
||||||
|
( (N - BOOST_MPL_UNROLLING_LIMIT) < 0 ? 0 : N - BOOST_MPL_UNROLLING_LIMIT )
|
||||||
|
, BOOST_PP_CAT(iter,BOOST_MPL_UNROLLING_LIMIT)
|
||||||
|
, Last
|
||||||
|
, BOOST_PP_CAT(fwd_state,BOOST_MPL_UNROLLING_LIMIT)
|
||||||
|
, BackwardOp
|
||||||
|
, ForwardOp
|
||||||
|
> nested_chunk;
|
||||||
|
|
||||||
|
AUX_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_UNROLLING_LIMIT)
|
||||||
|
|
||||||
|
BOOST_MPL_PP_REPEAT(
|
||||||
|
BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
, AUX_ITER_FOLD_BACKWARD_STEP
|
||||||
|
, BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
)
|
||||||
|
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef typename nested_chunk::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
// fallback implementation for sequences of unknown size
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct AUX_FOLD_IMPL_NAME<-1,First,Last,State,BackwardOp,ForwardOp>
|
||||||
|
{
|
||||||
|
typedef AUX_FOLD_IMPL_NAME<
|
||||||
|
-1
|
||||||
|
, typename BOOST_MPL_AUX_NEXT(First)
|
||||||
|
, Last
|
||||||
|
, typename BOOST_MPL_AUX_APPLY2(ForwardOp,State,BOOST_MPL_AUX_FOLD_IMPL_OP(First))::type
|
||||||
|
, BackwardOp
|
||||||
|
, ForwardOp
|
||||||
|
> nested_step;
|
||||||
|
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY2(
|
||||||
|
BackwardOp
|
||||||
|
, typename nested_step::state
|
||||||
|
, BOOST_MPL_AUX_FOLD_IMPL_OP(First)
|
||||||
|
)::type state;
|
||||||
|
|
||||||
|
typedef typename nested_step::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct AUX_FOLD_IMPL_NAME<-1,Last,Last,State,BackwardOp,ForwardOp>
|
||||||
|
{
|
||||||
|
typedef State state;
|
||||||
|
typedef Last iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
|
template< long >
|
||||||
|
struct AUX_FOLD_CHUNK_NAME;
|
||||||
|
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||||
|
(3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/fold_backward_impl_body.hpp"))
|
||||||
|
# include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
template< long N >
|
||||||
|
struct AUX_FOLD_CHUNK_NAME
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct result_
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
|
||||||
|
BOOST_MPL_PP_REPEAT(
|
||||||
|
BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
, AUX_ITER_FOLD_FORWARD_STEP
|
||||||
|
, unused
|
||||||
|
)
|
||||||
|
|
||||||
|
typedef AUX_FOLD_IMPL_NAME<
|
||||||
|
( (N - BOOST_MPL_UNROLLING_LIMIT) < 0 ? 0 : N - BOOST_MPL_UNROLLING_LIMIT )
|
||||||
|
, BOOST_PP_CAT(iter,BOOST_MPL_UNROLLING_LIMIT)
|
||||||
|
, Last
|
||||||
|
, BOOST_PP_CAT(fwd_state,BOOST_MPL_UNROLLING_LIMIT)
|
||||||
|
, BackwardOp
|
||||||
|
, ForwardOp
|
||||||
|
> nested_chunk;
|
||||||
|
|
||||||
|
AUX_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_UNROLLING_LIMIT)
|
||||||
|
|
||||||
|
BOOST_MPL_PP_REPEAT(
|
||||||
|
BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
, AUX_ITER_FOLD_BACKWARD_STEP
|
||||||
|
, BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
)
|
||||||
|
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef typename nested_chunk::iterator iterator;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// fallback implementation for sequences of unknown size
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step);
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Last
|
||||||
|
, typename State
|
||||||
|
>
|
||||||
|
struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_null_step)
|
||||||
|
{
|
||||||
|
typedef Last iterator;
|
||||||
|
typedef State state;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct AUX_FOLD_CHUNK_NAME<-1>
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct result_
|
||||||
|
{
|
||||||
|
typedef typename if_<
|
||||||
|
typename is_same<First,Last>::type
|
||||||
|
, BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_null_step)<Last,State>
|
||||||
|
, BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step)<First,Last,State,BackwardOp,ForwardOp>
|
||||||
|
>::type res_;
|
||||||
|
|
||||||
|
typedef typename res_::state state;
|
||||||
|
typedef typename res_::iterator iterator;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step)
|
||||||
|
{
|
||||||
|
typedef AUX_FOLD_CHUNK_NAME<-1>::template result_<
|
||||||
|
typename BOOST_MPL_AUX_NEXT(First)
|
||||||
|
, Last
|
||||||
|
, typename BOOST_MPL_AUX_APPLY2(ForwardOp,State,BOOST_MPL_AUX_FOLD_IMPL_OP(First))::type
|
||||||
|
, BackwardOp
|
||||||
|
, ForwardOp
|
||||||
|
> nested_step;
|
||||||
|
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY2(
|
||||||
|
BackwardOp
|
||||||
|
, typename nested_step::state
|
||||||
|
, BOOST_MPL_AUX_FOLD_IMPL_OP(First)
|
||||||
|
)::type state;
|
||||||
|
|
||||||
|
typedef typename nested_step::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct AUX_FOLD_IMPL_NAME
|
||||||
|
: AUX_FOLD_CHUNK_NAME<N>
|
||||||
|
::template result_<First,Last,State,BackwardOp,ForwardOp>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
# undef AUX_FIRST_BACKWARD_STATE_TYPEDEF
|
||||||
|
# undef AUX_ITER_FOLD_BACKWARD_STEP
|
||||||
|
# undef AUX_ITER_FOLD_BACKWARD_STEP_FUNC
|
||||||
|
# undef AUX_ITER_FOLD_FORWARD_STEP
|
||||||
|
|
||||||
|
#undef BOOST_MPL_AUX_FOLD_IMPL_OP
|
||||||
|
#undef BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX
|
||||||
|
|
||||||
|
///// iteration
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define i BOOST_PP_FRAME_ITERATION(1)
|
||||||
|
|
||||||
|
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct AUX_FOLD_IMPL_NAME<i,First,Last,State,BackwardOp,ForwardOp>
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
|
||||||
|
BOOST_MPL_PP_REPEAT(
|
||||||
|
i
|
||||||
|
, AUX_ITER_FOLD_FORWARD_STEP
|
||||||
|
, unused
|
||||||
|
)
|
||||||
|
|
||||||
|
typedef BOOST_PP_CAT(fwd_state,i) BOOST_PP_CAT(bkwd_state,i);
|
||||||
|
|
||||||
|
BOOST_MPL_PP_REPEAT(
|
||||||
|
i
|
||||||
|
, AUX_ITER_FOLD_BACKWARD_STEP
|
||||||
|
, i
|
||||||
|
)
|
||||||
|
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef BOOST_PP_CAT(iter,i) iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct AUX_FOLD_CHUNK_NAME<BOOST_PP_FRAME_ITERATION(1)>
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct result_
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
|
||||||
|
BOOST_MPL_PP_REPEAT(
|
||||||
|
i
|
||||||
|
, AUX_ITER_FOLD_FORWARD_STEP
|
||||||
|
, unused
|
||||||
|
)
|
||||||
|
|
||||||
|
typedef BOOST_PP_CAT(fwd_state,i) BOOST_PP_CAT(bkwd_state,i);
|
||||||
|
|
||||||
|
BOOST_MPL_PP_REPEAT(
|
||||||
|
i
|
||||||
|
, AUX_ITER_FOLD_BACKWARD_STEP
|
||||||
|
, i
|
||||||
|
)
|
||||||
|
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef BOOST_PP_CAT(iter,i) iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct result_<int,int,int,int,int>
|
||||||
|
{
|
||||||
|
typedef int state;
|
||||||
|
typedef int iterator;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
|
#undef i
|
||||||
|
#endif // BOOST_PP_IS_ITERATING
|
45
include/boost/mpl/aux_/fold_impl.hpp
Normal file
45
include/boost/mpl/aux_/fold_impl.hpp
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/fold_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/apply.hpp"
|
||||||
|
#include "boost/mpl/aux_/next.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && \
|
||||||
|
!defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include "boost/mpl/if.hpp"
|
||||||
|
# include "boost/type_traits/is_same.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
|
||||||
|
!defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER fold_impl.hpp
|
||||||
|
# include "boost/mpl/aux_/include_preprocessed.hpp"
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_FOLD_IMPL_OP(iter) typename iter::type
|
||||||
|
# define BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX fold
|
||||||
|
# include "boost/mpl/aux_/fold_impl_body.hpp"
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
|
||||||
|
#endif // BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED
|
365
include/boost/mpl/aux_/fold_impl_body.hpp
Normal file
365
include/boost/mpl/aux_/fold_impl_body.hpp
Normal file
@@ -0,0 +1,365 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/fold_impl_body.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
// no include guards, the header is intended for multiple inclusion!
|
||||||
|
|
||||||
|
#if !defined(BOOST_PP_IS_ITERATING)
|
||||||
|
|
||||||
|
# include "boost/mpl/aux_/apply.hpp"
|
||||||
|
# include "boost/mpl/aux_/next.hpp"
|
||||||
|
# include "boost/config.hpp"
|
||||||
|
|
||||||
|
# include "boost/mpl/limits/unrolling.hpp"
|
||||||
|
# include "boost/mpl/aux_/preprocessor/repeat.hpp"
|
||||||
|
|
||||||
|
# include "boost/preprocessor/iterate.hpp"
|
||||||
|
# include "boost/preprocessor/dec.hpp"
|
||||||
|
# include "boost/preprocessor/cat.hpp"
|
||||||
|
|
||||||
|
// local macros, #undef-ined at the end of the header
|
||||||
|
|
||||||
|
# define AUX_ITER_FOLD_STEP(i, unused) \
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY2( \
|
||||||
|
ForwardOp \
|
||||||
|
, BOOST_PP_CAT(state,i) \
|
||||||
|
, BOOST_MPL_AUX_FOLD_IMPL_OP(BOOST_PP_CAT(iter,i)) \
|
||||||
|
)::type BOOST_PP_CAT(state,BOOST_PP_INC(i)); \
|
||||||
|
typedef typename BOOST_MPL_AUX_NEXT(BOOST_PP_CAT(iter,i)) \
|
||||||
|
BOOST_PP_CAT(iter,BOOST_PP_INC(i)); \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_FOLD_IMPL_NAME \
|
||||||
|
BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_impl) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_FOLD_CHUNK_NAME \
|
||||||
|
BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_chunk) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
//: forward declaration
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct AUX_FOLD_IMPL_NAME;
|
||||||
|
|
||||||
|
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
|
|
||||||
|
# if !defined(__BORLANDC__)
|
||||||
|
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||||
|
(3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/fold_impl_body.hpp"))
|
||||||
|
# include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct AUX_FOLD_IMPL_NAME
|
||||||
|
{
|
||||||
|
typedef AUX_FOLD_IMPL_NAME<
|
||||||
|
BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
, First
|
||||||
|
, Last
|
||||||
|
, State
|
||||||
|
, ForwardOp
|
||||||
|
> chunk_;
|
||||||
|
|
||||||
|
typedef AUX_FOLD_IMPL_NAME<
|
||||||
|
( (N - BOOST_MPL_UNROLLING_LIMIT) < 0 ? 0 : N - BOOST_MPL_UNROLLING_LIMIT )
|
||||||
|
, typename chunk_::iterator
|
||||||
|
, Last
|
||||||
|
, typename chunk_::state
|
||||||
|
, ForwardOp
|
||||||
|
> res_;
|
||||||
|
|
||||||
|
typedef typename res_::state state;
|
||||||
|
typedef typename res_::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
// fallback implementation for sequences of unknown size
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct AUX_FOLD_IMPL_NAME<-1,First,Last,State,ForwardOp>
|
||||||
|
: AUX_FOLD_IMPL_NAME<
|
||||||
|
-1
|
||||||
|
, typename BOOST_MPL_AUX_NEXT(First)
|
||||||
|
, Last
|
||||||
|
, typename BOOST_MPL_AUX_APPLY2(ForwardOp,State,BOOST_MPL_AUX_FOLD_IMPL_OP(First))::type
|
||||||
|
, ForwardOp
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct AUX_FOLD_IMPL_NAME<-1,Last,Last,State,ForwardOp>
|
||||||
|
{
|
||||||
|
typedef State state;
|
||||||
|
typedef Last iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
# else // __BORLANDC__
|
||||||
|
|
||||||
|
// Borland have some serious problems with the unrolled version, so
|
||||||
|
// we always use a basic implementation
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct AUX_FOLD_IMPL_NAME
|
||||||
|
{
|
||||||
|
typedef AUX_FOLD_IMPL_NAME<
|
||||||
|
-1
|
||||||
|
, typename First::next
|
||||||
|
, Last
|
||||||
|
, typename BOOST_MPL_AUX_APPLY2(ForwardOp,State,BOOST_MPL_AUX_FOLD_IMPL_OP(First))::type
|
||||||
|
, ForwardOp
|
||||||
|
> res_;
|
||||||
|
|
||||||
|
typedef typename res_::state state;
|
||||||
|
typedef typename res_::iterator iterator;
|
||||||
|
typedef state type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct AUX_FOLD_IMPL_NAME<N,Last,Last,State,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef State state;
|
||||||
|
typedef Last iterator;
|
||||||
|
typedef state type;
|
||||||
|
};
|
||||||
|
|
||||||
|
# endif // __BORLANDC__
|
||||||
|
|
||||||
|
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
|
template< long >
|
||||||
|
struct AUX_FOLD_CHUNK_NAME;
|
||||||
|
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||||
|
(3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/fold_impl_body.hpp"))
|
||||||
|
# include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
template< long N >
|
||||||
|
struct AUX_FOLD_CHUNK_NAME
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct result_
|
||||||
|
{
|
||||||
|
typedef AUX_FOLD_IMPL_NAME<
|
||||||
|
BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
, First
|
||||||
|
, Last
|
||||||
|
, State
|
||||||
|
, ForwardOp
|
||||||
|
> chunk_;
|
||||||
|
|
||||||
|
typedef AUX_FOLD_IMPL_NAME<
|
||||||
|
( (N - BOOST_MPL_UNROLLING_LIMIT) < 0 ? 0 : N - BOOST_MPL_UNROLLING_LIMIT )
|
||||||
|
, typename chunk_::iterator
|
||||||
|
, Last
|
||||||
|
, typename chunk_::state
|
||||||
|
, ForwardOp
|
||||||
|
> res_;
|
||||||
|
|
||||||
|
typedef typename res_::state state;
|
||||||
|
typedef typename res_::iterator iterator;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// fallback implementation for sequences of unknown size
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step);
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Last
|
||||||
|
, typename State
|
||||||
|
>
|
||||||
|
struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_null_step)
|
||||||
|
{
|
||||||
|
typedef Last iterator;
|
||||||
|
typedef State state;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct AUX_FOLD_CHUNK_NAME<-1>
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct result_
|
||||||
|
{
|
||||||
|
typedef typename if_<
|
||||||
|
typename is_same<First,Last>::type
|
||||||
|
, BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_null_step)<Last,State>
|
||||||
|
, BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step)<First,Last,State,ForwardOp>
|
||||||
|
>::type res_;
|
||||||
|
|
||||||
|
typedef typename res_::state state;
|
||||||
|
typedef typename res_::iterator iterator;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step)
|
||||||
|
{
|
||||||
|
// can't inherit here - it breaks MSVC 7.0
|
||||||
|
typedef AUX_FOLD_CHUNK_NAME<-1>::template result_<
|
||||||
|
typename BOOST_MPL_AUX_NEXT(First)
|
||||||
|
, Last
|
||||||
|
, typename BOOST_MPL_AUX_APPLY2(ForwardOp,State,BOOST_MPL_AUX_FOLD_IMPL_OP(First))::type
|
||||||
|
, ForwardOp
|
||||||
|
> chunk_;
|
||||||
|
|
||||||
|
typedef typename chunk_::state state;
|
||||||
|
typedef typename chunk_::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct AUX_FOLD_IMPL_NAME
|
||||||
|
: AUX_FOLD_CHUNK_NAME<N>
|
||||||
|
::template result_<First,Last,State,ForwardOp>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
# undef AUX_FOLD_IMPL_NAME
|
||||||
|
# undef AUX_FOLD_CHUNK_NAME
|
||||||
|
# undef AUX_ITER_FOLD_STEP
|
||||||
|
|
||||||
|
#undef BOOST_MPL_AUX_FOLD_IMPL_OP
|
||||||
|
#undef BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX
|
||||||
|
|
||||||
|
///// iteration
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct AUX_FOLD_IMPL_NAME<BOOST_PP_FRAME_ITERATION(1),First,Last,State,ForwardOp>
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State state0;
|
||||||
|
|
||||||
|
BOOST_MPL_PP_REPEAT(
|
||||||
|
BOOST_PP_FRAME_ITERATION(1)
|
||||||
|
, AUX_ITER_FOLD_STEP
|
||||||
|
, unused
|
||||||
|
)
|
||||||
|
|
||||||
|
typedef BOOST_PP_CAT(state,BOOST_PP_FRAME_ITERATION(1)) state;
|
||||||
|
typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct AUX_FOLD_CHUNK_NAME<BOOST_PP_FRAME_ITERATION(1)>
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct result_
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State state0;
|
||||||
|
|
||||||
|
BOOST_MPL_PP_REPEAT(
|
||||||
|
BOOST_PP_FRAME_ITERATION(1)
|
||||||
|
, AUX_ITER_FOLD_STEP
|
||||||
|
, unused
|
||||||
|
)
|
||||||
|
|
||||||
|
typedef BOOST_PP_CAT(state,BOOST_PP_FRAME_ITERATION(1)) state;
|
||||||
|
typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct result_<int,int,int,int>
|
||||||
|
{
|
||||||
|
typedef int state;
|
||||||
|
typedef int iterator;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
|
#endif // BOOST_PP_IS_ITERATING
|
44
include/boost/mpl/aux_/fold_op.hpp
Normal file
44
include/boost/mpl/aux_/fold_op.hpp
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/fold_op.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_FOLD_OP_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_FOLD_OP_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/apply.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
// hand-written version is more efficient than bind/lambda expression
|
||||||
|
template< typename Op >
|
||||||
|
struct fold_op
|
||||||
|
{
|
||||||
|
template< typename T1, typename T2 > struct apply
|
||||||
|
{
|
||||||
|
typedef typename apply2<
|
||||||
|
Op
|
||||||
|
, T1
|
||||||
|
, typename T2::type
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_FOLD_OP_HPP_INCLUDED
|
44
include/boost/mpl/aux_/fold_pred.hpp
Normal file
44
include/boost/mpl/aux_/fold_pred.hpp
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/fold_pred.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_FOLD_PRED_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_FOLD_PRED_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/same_as.hpp"
|
||||||
|
#include "boost/mpl/apply.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template< typename Last >
|
||||||
|
struct fold_pred
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename State
|
||||||
|
, typename Iterator
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
: not_same_as<Last>::template apply<Iterator>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_FOLD_PRED_HPP_INCLUDED
|
46
include/boost/mpl/aux_/front_impl.hpp
Normal file
46
include/boost/mpl/aux_/front_impl.hpp
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/front_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/front_fwd.hpp"
|
||||||
|
#include "boost/mpl/begin_end.hpp"
|
||||||
|
#include "boost/mpl/aux_/deref_wknd.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_traits| or the primary |front| template
|
||||||
|
|
||||||
|
template< typename Tag >
|
||||||
|
struct front_traits
|
||||||
|
{
|
||||||
|
template< typename Sequence > struct algorithm
|
||||||
|
{
|
||||||
|
typedef typename begin<Sequence>::type iter_;
|
||||||
|
typedef typename BOOST_MPL_AUX_DEREF_WNKD(iter_) type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,front_traits)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED
|
364
include/boost/mpl/aux_/full_lambda.hpp
Normal file
364
include/boost/mpl/aux_/full_lambda.hpp
Normal file
@@ -0,0 +1,364 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/full_lambda.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#if !defined(BOOST_PP_IS_ITERATING)
|
||||||
|
|
||||||
|
///// header body
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include "boost/mpl/lambda_fwd.hpp"
|
||||||
|
# include "boost/mpl/bind.hpp"
|
||||||
|
# include "boost/mpl/protect.hpp"
|
||||||
|
# include "boost/mpl/meta_fun.hpp"
|
||||||
|
# include "boost/mpl/bool_c.hpp"
|
||||||
|
# include "boost/mpl/aux_/template_arity.hpp"
|
||||||
|
# include "boost/mpl/aux_/config/ttp.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/lambda_expr.hpp"
|
||||||
|
#include "boost/mpl/aux_/lambda_arity_param.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
|
||||||
|
!defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER full_lambda.hpp
|
||||||
|
# include "boost/mpl/aux_/include_preprocessed.hpp"
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include "boost/mpl/limits/arity.hpp"
|
||||||
|
# include "boost/mpl/aux_/preprocessor/default_params.hpp"
|
||||||
|
# include "boost/mpl/aux_/preprocessor/params.hpp"
|
||||||
|
# include "boost/mpl/aux_/preprocessor/enum.hpp"
|
||||||
|
# include "boost/mpl/aux_/preprocessor/repeat.hpp"
|
||||||
|
|
||||||
|
# include "boost/preprocessor/iterate.hpp"
|
||||||
|
# include "boost/preprocessor/comma_if.hpp"
|
||||||
|
# include "boost/preprocessor/inc.hpp"
|
||||||
|
# include "boost/preprocessor/cat.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
// local macros, #undef-ined at the end of the header
|
||||||
|
# define AUX_LAMBDA_PARAMS(i, param) \
|
||||||
|
BOOST_MPL_PP_PARAMS(i, param) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_LAMBDA_BIND_PARAMS(param) \
|
||||||
|
BOOST_MPL_PP_PARAMS( \
|
||||||
|
BOOST_MPL_METAFUNCTION_MAX_ARITY \
|
||||||
|
, param \
|
||||||
|
) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_LAMBDA_BIND_N_PARAMS(i, param) \
|
||||||
|
BOOST_PP_COMMA_IF(i) \
|
||||||
|
BOOST_MPL_PP_PARAMS(i, param) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_ARITY_PARAM(param) \
|
||||||
|
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, bool Protect = false
|
||||||
|
AUX_ARITY_PARAM(long Arity = aux::template_arity<T>::value)
|
||||||
|
>
|
||||||
|
struct lambda_impl
|
||||||
|
{
|
||||||
|
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c)
|
||||||
|
typedef T type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
AUX_ARITY_PARAM(long Arity = aux::template_arity<T>::value)
|
||||||
|
>
|
||||||
|
struct lambda
|
||||||
|
: lambda_impl<T,false AUX_ARITY_PARAM(Arity)>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_NO_LAMBDA_HEURISTIC)
|
||||||
|
|
||||||
|
#define n BOOST_MPL_METAFUNCTION_MAX_ARITY
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
BOOST_MPL_PP_DEFAULT_PARAMS(n,bool C,false)
|
||||||
|
>
|
||||||
|
struct lambda_or
|
||||||
|
: true_c
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct lambda_or< BOOST_MPL_PP_ENUM(n,false) >
|
||||||
|
: false_c
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
#undef n
|
||||||
|
|
||||||
|
template< int N, bool Protect AUX_ARITY_PARAM(long Arity) >
|
||||||
|
struct lambda_impl< arg<N>, Protect AUX_ARITY_PARAM(Arity) >
|
||||||
|
{
|
||||||
|
BOOST_MPL_AUX_IS_LAMBDA_EXPR(true_c)
|
||||||
|
typedef arg<N> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_NO_LAMBDA_HEURISTIC
|
||||||
|
|
||||||
|
#define BOOST_PP_ITERATION_PARAMS_1 \
|
||||||
|
(3,(0, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/aux_/full_lambda.hpp"))
|
||||||
|
#include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
//: special case for 'protect'
|
||||||
|
template< typename T, bool Protect >
|
||||||
|
struct lambda_impl< protect<T>, Protect AUX_ARITY_PARAM(-1) >
|
||||||
|
{
|
||||||
|
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c)
|
||||||
|
typedef protect<T> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
//: specializations for main 'bind', 'bind1st' and 'bind2nd' forms
|
||||||
|
template<
|
||||||
|
typename F, AUX_LAMBDA_BIND_PARAMS(typename T)
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl< bind<F,AUX_LAMBDA_BIND_PARAMS(T)>, Protect AUX_ARITY_PARAM(-1) >
|
||||||
|
{
|
||||||
|
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c)
|
||||||
|
typedef bind<F, AUX_LAMBDA_BIND_PARAMS(T)> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl< bind1st<F,T>, Protect AUX_ARITY_PARAM(-1) >
|
||||||
|
{
|
||||||
|
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c)
|
||||||
|
typedef bind1st<F,T> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl< bind2nd<F,T>, Protect AUX_ARITY_PARAM(-1) >
|
||||||
|
{
|
||||||
|
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c)
|
||||||
|
typedef bind2nd<F,T> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
# undef AUX_ARITY_PARAM
|
||||||
|
# undef AUX_LAMBDA_BIND_N_PARAMS
|
||||||
|
# undef AUX_LAMBDA_BIND_PARAMS
|
||||||
|
# undef AUX_LAMBDA_PARAMS
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
|
||||||
|
#endif // BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED
|
||||||
|
|
||||||
|
///// iteration, depth == 1
|
||||||
|
|
||||||
|
#elif BOOST_PP_ITERATION_DEPTH() == 1
|
||||||
|
#define i BOOST_PP_FRAME_ITERATION(1)
|
||||||
|
|
||||||
|
#if i > 0
|
||||||
|
#if defined(BOOST_MPL_NO_LAMBDA_HEURISTIC)
|
||||||
|
|
||||||
|
#if !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_2 \
|
||||||
|
(3,(0, 0, "boost/mpl/aux_/full_lambda.hpp"))
|
||||||
|
#else
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_2 \
|
||||||
|
(3,(0, 1, "boost/mpl/aux_/full_lambda.hpp"))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
#else // BOOST_MPL_NO_LAMBDA_HEURISTIC
|
||||||
|
|
||||||
|
# define AUX_LAMBDA_RESULT(i, T) \
|
||||||
|
BOOST_PP_COMMA_IF(i) \
|
||||||
|
typename BOOST_PP_CAT(T, BOOST_PP_INC(i))::type \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
bool IsLE
|
||||||
|
, bool Protect
|
||||||
|
, template< AUX_LAMBDA_PARAMS(i, typename P) > class F
|
||||||
|
, AUX_LAMBDA_PARAMS(i, typename L)
|
||||||
|
>
|
||||||
|
struct BOOST_PP_CAT(le_result,i)
|
||||||
|
{
|
||||||
|
typedef F<
|
||||||
|
BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_RESULT, L)
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
|
||||||
|
, AUX_LAMBDA_PARAMS(i, typename L)
|
||||||
|
>
|
||||||
|
struct BOOST_PP_CAT(le_result,i)< true,false,F,AUX_LAMBDA_PARAMS(i, L) >
|
||||||
|
{
|
||||||
|
typedef BOOST_PP_CAT(bind,i)<
|
||||||
|
BOOST_PP_CAT(meta_fun,i)<F>
|
||||||
|
, BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_RESULT, L)
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
|
||||||
|
, AUX_LAMBDA_PARAMS(i, typename L)
|
||||||
|
>
|
||||||
|
struct BOOST_PP_CAT(le_result,i)< true,true,F,AUX_LAMBDA_PARAMS(i, L) >
|
||||||
|
{
|
||||||
|
typedef protect< BOOST_PP_CAT(bind,i)<
|
||||||
|
BOOST_PP_CAT(meta_fun,i)<F>
|
||||||
|
, BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_RESULT, L)
|
||||||
|
> > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
# define AUX_LAMBDA_INVOCATION(i, T) \
|
||||||
|
typedef lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)) > \
|
||||||
|
BOOST_PP_CAT(l,BOOST_PP_INC(i)); \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_IS_LAMBDA_EXPR(i, unused) \
|
||||||
|
BOOST_PP_COMMA_IF(i) \
|
||||||
|
BOOST_PP_CAT(l,BOOST_PP_INC(i))::is_le::value \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
#if !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_2 \
|
||||||
|
(3,(0, 0, "boost/mpl/aux_/full_lambda.hpp"))
|
||||||
|
#else
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_2 \
|
||||||
|
(3,(0, 1, "boost/mpl/aux_/full_lambda.hpp"))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
# undef AUX_IS_LAMBDA_EXPR
|
||||||
|
# undef AUX_LAMBDA_INVOCATION
|
||||||
|
# undef AUX_LAMBDA_RESULT
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_NO_LAMBDA_HEURISTIC
|
||||||
|
#endif // i > 0
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F AUX_LAMBDA_BIND_N_PARAMS(i, typename T)
|
||||||
|
, bool Protect AUX_ARITY_PARAM(long Arity)
|
||||||
|
>
|
||||||
|
struct lambda_impl<
|
||||||
|
BOOST_PP_CAT(bind,i)<F AUX_LAMBDA_BIND_N_PARAMS(i, T)>
|
||||||
|
, Protect AUX_ARITY_PARAM(Arity)
|
||||||
|
>
|
||||||
|
{
|
||||||
|
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c)
|
||||||
|
typedef BOOST_PP_CAT(bind,i)<
|
||||||
|
F
|
||||||
|
AUX_LAMBDA_BIND_N_PARAMS(i, T)
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef i
|
||||||
|
|
||||||
|
///// iteration, depth == 2
|
||||||
|
|
||||||
|
#elif BOOST_PP_ITERATION_DEPTH() == 2
|
||||||
|
|
||||||
|
#if BOOST_PP_FRAME_ITERATION(2) > 0
|
||||||
|
# define AUX_LAMBDA_IMPL_ARITY AUX_ARITY_PARAM(i)
|
||||||
|
#else
|
||||||
|
# define AUX_LAMBDA_IMPL_ARITY AUX_ARITY_PARAM(-1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
|
||||||
|
, AUX_LAMBDA_PARAMS(i, typename T)
|
||||||
|
>
|
||||||
|
struct lambda< F<AUX_LAMBDA_PARAMS(i, T)> AUX_LAMBDA_IMPL_ARITY >
|
||||||
|
: lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>, true AUX_LAMBDA_IMPL_ARITY >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_NO_LAMBDA_HEURISTIC)
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
|
||||||
|
, AUX_LAMBDA_PARAMS(i, typename T)
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>, Protect AUX_LAMBDA_IMPL_ARITY >
|
||||||
|
{
|
||||||
|
# define AUX_LAMBDA_INVOCATION(i, T) \
|
||||||
|
BOOST_PP_COMMA_IF(i) \
|
||||||
|
typename lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)) >::type \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
typedef BOOST_PP_CAT(bind,i)<
|
||||||
|
BOOST_PP_CAT(meta_fun,i)<F>
|
||||||
|
, BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
|
||||||
|
> type;
|
||||||
|
|
||||||
|
# undef AUX_LAMBDA_INVOCATION
|
||||||
|
};
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
|
||||||
|
, AUX_LAMBDA_PARAMS(i, typename T)
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>, Protect AUX_LAMBDA_IMPL_ARITY >
|
||||||
|
{
|
||||||
|
BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
|
||||||
|
typedef aux::lambda_or<
|
||||||
|
BOOST_MPL_PP_REPEAT(i, AUX_IS_LAMBDA_EXPR, unused)
|
||||||
|
> is_le;
|
||||||
|
|
||||||
|
typedef typename aux::BOOST_PP_CAT(le_result,i)<
|
||||||
|
is_le::value
|
||||||
|
, Protect
|
||||||
|
, F
|
||||||
|
, AUX_LAMBDA_PARAMS(i, l)
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_NO_LAMBDA_HEURISTIC
|
||||||
|
|
||||||
|
# undef AUX_LAMBDA_IMPL_ARITY
|
||||||
|
|
||||||
|
#endif // BOOST_PP_IS_ITERATING
|
114
include/boost/mpl/aux_/has_rebind.hpp
Normal file
114
include/boost/mpl/aux_/has_rebind.hpp
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/has_rebind.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/type_wrapper.hpp"
|
||||||
|
#include "boost/mpl/aux_/yes_no.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/msvc_typename.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/overload_resolution.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION)
|
||||||
|
#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
|
||||||
|
|
||||||
|
// the implementation below is based on a USENET newsgroup's posting by
|
||||||
|
// Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST)
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
yes_tag
|
||||||
|
has_rebind_helper(type_wrapper<T>, BOOST_MSVC_TYPENAME T::rebind*);
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
no_tag
|
||||||
|
has_rebind_helper(type_wrapper<T>, ...);
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
struct has_rebind
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(bool, value =
|
||||||
|
sizeof(has_rebind_helper(type_wrapper<T>(), 0))
|
||||||
|
== sizeof(yes_tag)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
// agurt, 11/sep/02: MSVC version, based on a USENET newsgroup's posting by
|
||||||
|
// John Madsen (comp.lang.c++.moderated, 1999-11-12 19:17:06 GMT);
|
||||||
|
// note that the code is _not_ standard-conforming, but it works,
|
||||||
|
// and it resolves some nasty ICE cases with the above implementation
|
||||||
|
|
||||||
|
template< typename T, typename rebind = int >
|
||||||
|
struct has_rebind : T
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static no_tag test(int*);
|
||||||
|
static yes_tag test(...);
|
||||||
|
|
||||||
|
public:
|
||||||
|
BOOST_STATIC_CONSTANT(bool, value =
|
||||||
|
sizeof(test(static_cast<rebind*>(0))) != sizeof(no_tag)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
# define AUX_HAS_REBIND_SPEC(T) \
|
||||||
|
template<> struct has_rebind<T,int> \
|
||||||
|
{ \
|
||||||
|
enum { value = false }; \
|
||||||
|
}; \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
AUX_HAS_REBIND_SPEC(bool)
|
||||||
|
AUX_HAS_REBIND_SPEC(char)
|
||||||
|
AUX_HAS_REBIND_SPEC(signed char)
|
||||||
|
AUX_HAS_REBIND_SPEC(unsigned char)
|
||||||
|
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
|
||||||
|
AUX_HAS_REBIND_SPEC(wchar_t)
|
||||||
|
#endif
|
||||||
|
AUX_HAS_REBIND_SPEC(signed short)
|
||||||
|
AUX_HAS_REBIND_SPEC(unsigned short)
|
||||||
|
AUX_HAS_REBIND_SPEC(signed int)
|
||||||
|
AUX_HAS_REBIND_SPEC(unsigned int)
|
||||||
|
AUX_HAS_REBIND_SPEC(signed long)
|
||||||
|
AUX_HAS_REBIND_SPEC(unsigned long)
|
||||||
|
AUX_HAS_REBIND_SPEC(float)
|
||||||
|
AUX_HAS_REBIND_SPEC(double)
|
||||||
|
AUX_HAS_REBIND_SPEC(long double)
|
||||||
|
|
||||||
|
# undef AUX_HAS_REBIND_SPEC
|
||||||
|
|
||||||
|
#endif // BOOST_MSVC > 1300
|
||||||
|
#else
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
struct has_rebind
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
|
63
include/boost/mpl/aux_/has_size.hpp
Normal file
63
include/boost/mpl/aux_/has_size.hpp
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/has_size.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/type_wrapper.hpp"
|
||||||
|
#include "boost/mpl/aux_/yes_no.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/msvc_typename.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/overload_resolution.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION)
|
||||||
|
|
||||||
|
// the implementation below is based on a USENET newsgroup posting by
|
||||||
|
// Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST)
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
yes_tag has_size_helper(type_wrapper<T>, BOOST_MSVC_TYPENAME T::size*);
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
no_tag has_size_helper(type_wrapper<T>, ...);
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
struct has_size
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(bool, value =
|
||||||
|
sizeof(has_size_helper(type_wrapper<T>(), 0)) == sizeof(yes_tag)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
struct has_size
|
||||||
|
{
|
||||||
|
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED
|
39
include/boost/mpl/aux_/include_preprocessed.hpp
Normal file
39
include/boost/mpl/aux_/include_preprocessed.hpp
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/include_preprocessed.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
// no include guards, the header is intended for multiple inclusion!
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/compiler.hpp"
|
||||||
|
#include "boost/preprocessor/cat.hpp"
|
||||||
|
#include "boost/preprocessor/stringize.hpp"
|
||||||
|
|
||||||
|
// local macro, #undef-ined at the end of the header
|
||||||
|
#define AUX_PREPROCESSED_HEADER \
|
||||||
|
BOOST_PP_STRINGIZE( \
|
||||||
|
BOOST_PP_CAT( \
|
||||||
|
BOOST_PP_CAT( \
|
||||||
|
boost/mpl/aux_/preprocessed/ \
|
||||||
|
, BOOST_MPL_COMPILER_DIR \
|
||||||
|
) \
|
||||||
|
, BOOST_MPL_PREPROCESSED_HEADER \
|
||||||
|
) \
|
||||||
|
) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
#include AUX_PREPROCESSED_HEADER
|
||||||
|
|
||||||
|
#undef AUX_PREPROCESSED_HEADER
|
||||||
|
#undef BOOST_MPL_PREPROCESSED_HEADER
|
73
include/boost/mpl/aux_/insert_impl.hpp
Normal file
73
include/boost/mpl/aux_/insert_impl.hpp
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/insert_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_INSERT_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_INSERT_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/copy_backward.hpp"
|
||||||
|
#include "boost/mpl/iterator_range.hpp"
|
||||||
|
#include "boost/mpl/clear.hpp"
|
||||||
|
#include "boost/mpl/push_front.hpp"
|
||||||
|
#include "boost/mpl/aux_/void_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_traits| or the primary |insert| template
|
||||||
|
|
||||||
|
template< typename Tag >
|
||||||
|
struct insert_traits
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename Sequence
|
||||||
|
, typename Pos
|
||||||
|
, typename T
|
||||||
|
>
|
||||||
|
struct algorithm
|
||||||
|
{
|
||||||
|
typedef iterator_range<
|
||||||
|
typename begin<Sequence>::type
|
||||||
|
, Pos
|
||||||
|
> first_half_;
|
||||||
|
|
||||||
|
typedef iterator_range<
|
||||||
|
Pos
|
||||||
|
, typename end<Sequence>::type
|
||||||
|
> second_half_;
|
||||||
|
|
||||||
|
typedef typename copy_backward<
|
||||||
|
second_half_
|
||||||
|
, typename clear<Sequence>::type
|
||||||
|
, push_front<_,_>
|
||||||
|
>::type half_sequence_;
|
||||||
|
|
||||||
|
typedef typename copy_backward<
|
||||||
|
first_half_
|
||||||
|
, typename push_front<half_sequence_,T>::type
|
||||||
|
, push_front<_,_>
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_traits)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_INSERT_IMPL_HPP_INCLUDED
|
85
include/boost/mpl/aux_/insert_range_impl.hpp
Normal file
85
include/boost/mpl/aux_/insert_range_impl.hpp
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/insert_range_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/iter_fold_backward.hpp"
|
||||||
|
#include "boost/mpl/fold_backward.hpp"
|
||||||
|
#include "boost/mpl/clear.hpp"
|
||||||
|
#include "boost/mpl/push_front.hpp"
|
||||||
|
#include "boost/mpl/identity.hpp"
|
||||||
|
#include "boost/mpl/apply_if.hpp"
|
||||||
|
#include "boost/mpl/aux_/void_spec.hpp"
|
||||||
|
#include "boost/mpl/aux_/iter_push_front.hpp"
|
||||||
|
#include "boost/mpl/aux_/traits_lambda_spec.hpp"
|
||||||
|
#include "boost/type_traits/same_traits.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
// default implementation; conrete sequences might override it by
|
||||||
|
// specializing either the |insert_range_traits| or the primary
|
||||||
|
// |insert_range| template
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Pos
|
||||||
|
, typename Range
|
||||||
|
>
|
||||||
|
struct iter_range_inserter
|
||||||
|
{
|
||||||
|
template< typename Sequence, typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef typename aux::iter_push_front<
|
||||||
|
typename apply_if<
|
||||||
|
is_same<Pos,typename Iterator::next>
|
||||||
|
, fold_backward< Range, Sequence, push_front<_,_> >
|
||||||
|
, identity<Sequence>
|
||||||
|
>::type
|
||||||
|
, Iterator
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
|
||||||
|
template< typename Tag >
|
||||||
|
struct insert_range_traits
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename Sequence
|
||||||
|
, typename Pos
|
||||||
|
, typename Range
|
||||||
|
>
|
||||||
|
struct algorithm
|
||||||
|
{
|
||||||
|
typedef typename iter_fold_backward<
|
||||||
|
Sequence
|
||||||
|
, typename clear<Sequence>::type
|
||||||
|
, aux::iter_range_inserter<Pos,Range>
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_range_traits)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
|
53
include/boost/mpl/aux_/iter_apply.hpp
Normal file
53
include/boost/mpl/aux_/iter_apply.hpp
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/iter_apply.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ITER_APPLY_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ITER_APPLY_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/apply.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F
|
||||||
|
, typename Iterator
|
||||||
|
>
|
||||||
|
struct iter_apply1
|
||||||
|
: apply1<F,typename Iterator::type>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F
|
||||||
|
, typename Iterator1
|
||||||
|
, typename Iterator2
|
||||||
|
>
|
||||||
|
struct iter_apply2
|
||||||
|
: apply2<
|
||||||
|
F
|
||||||
|
, typename Iterator1::type
|
||||||
|
, typename Iterator2::type
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_ITER_APPLY_HPP_INCLUDED
|
62
include/boost/mpl/aux_/iter_distance.hpp
Normal file
62
include/boost/mpl/aux_/iter_distance.hpp
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/iter_distance.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_ITER_DISTANCE_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_ITER_DISTANCE_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/iterator_names.hpp"
|
||||||
|
#include "boost/mpl/aux_/msvc_never_true.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
|
||||||
|
|
||||||
|
// msvc_distance
|
||||||
|
#define BOOST_MPL_AUX_MSVC_DTW_NAME msvc_distance
|
||||||
|
#define BOOST_MPL_AUX_MSVC_DTW_ORIGINAL_NAME BOOST_MPL_AUX_ITERATOR_DISTANCE
|
||||||
|
#define BOOST_MPL_AUX_MSVC_DTW_ARITY 1
|
||||||
|
#include "boost/mpl/aux_/msvc_dtw.hpp"
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Iterator
|
||||||
|
, typename Other
|
||||||
|
>
|
||||||
|
struct iter_distance
|
||||||
|
: msvc_distance<Iterator>::template result_<Other>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Iterator
|
||||||
|
, typename Other
|
||||||
|
>
|
||||||
|
struct iter_distance
|
||||||
|
: Iterator::template BOOST_MPL_AUX_ITERATOR_DISTANCE<Other>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_ITER_DISTANCE_HPP_INCLUDED
|
46
include/boost/mpl/aux_/iter_fold_backward_impl.hpp
Normal file
46
include/boost/mpl/aux_/iter_fold_backward_impl.hpp
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/iter_fold_backward_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/apply.hpp"
|
||||||
|
#include "boost/mpl/aux_/next.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/eti.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && \
|
||||||
|
!defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include "boost/mpl/if.hpp"
|
||||||
|
# include "boost/type_traits/is_same.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
|
||||||
|
!defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER iter_fold_backward_impl.hpp
|
||||||
|
# include "boost/mpl/aux_/include_preprocessed.hpp"
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_FOLD_IMPL_OP(iter) iter
|
||||||
|
# define BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX iter_fold_backward
|
||||||
|
# include "boost/mpl/aux_/fold_backward_impl_body.hpp"
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
|
||||||
|
#endif // BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED
|
217
include/boost/mpl/aux_/iter_fold_if_impl.hpp
Normal file
217
include/boost/mpl/aux_/iter_fold_if_impl.hpp
Normal file
@@ -0,0 +1,217 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/iter_fold_if_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy, David Abrahams
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/apply.hpp"
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include "boost/mpl/identity.hpp"
|
||||||
|
# include "boost/mpl/next.hpp"
|
||||||
|
# include "boost/mpl/if.hpp"
|
||||||
|
# include "boost/mpl/aux_/bool_value_wknd.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
|
||||||
|
!defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER iter_fold_if_impl.hpp
|
||||||
|
# include "boost/mpl/aux_/include_preprocessed.hpp"
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include "boost/mpl/limits/unrolling.hpp"
|
||||||
|
# include "boost/preprocessor/arithmetic/sub.hpp"
|
||||||
|
# include "boost/preprocessor/repeat.hpp"
|
||||||
|
# include "boost/preprocessor/inc.hpp"
|
||||||
|
# include "boost/preprocessor/dec.hpp"
|
||||||
|
# include "boost/preprocessor/cat.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template< typename Iterator, typename State >
|
||||||
|
struct iter_fold_if_null_step
|
||||||
|
{
|
||||||
|
typedef State state;
|
||||||
|
typedef Iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template< bool >
|
||||||
|
struct iter_fold_if_step_impl
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename Iterator
|
||||||
|
, typename State
|
||||||
|
, typename StateOp
|
||||||
|
, typename IteratorOp
|
||||||
|
>
|
||||||
|
struct result_
|
||||||
|
{
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY2(StateOp,State,Iterator)::type state;
|
||||||
|
typedef typename IteratorOp::type iterator;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct iter_fold_if_step_impl<false>
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename Iterator
|
||||||
|
, typename State
|
||||||
|
, typename StateOp
|
||||||
|
, typename IteratorOp
|
||||||
|
>
|
||||||
|
struct result_
|
||||||
|
{
|
||||||
|
typedef State state;
|
||||||
|
typedef Iterator iterator;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// agurt, 25/jun/02: MSVC 6.5 workaround, had to get rid of inheritance
|
||||||
|
// here and in 'iter_fold_if_backward_step', because sometimes it interfered
|
||||||
|
// with the "early template instantiation bug" in _really_ ugly ways
|
||||||
|
template<
|
||||||
|
typename Iterator
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
, typename Predicate
|
||||||
|
>
|
||||||
|
struct iter_fold_if_forward_step
|
||||||
|
{
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY2(Predicate,State,Iterator)::type not_last;
|
||||||
|
typedef typename iter_fold_if_step_impl<
|
||||||
|
BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value
|
||||||
|
>::template result_< Iterator,State,ForwardOp,next<Iterator> > impl_;
|
||||||
|
|
||||||
|
typedef typename impl_::state state;
|
||||||
|
typedef typename impl_::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Iterator
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename Predicate
|
||||||
|
>
|
||||||
|
struct iter_fold_if_backward_step
|
||||||
|
{
|
||||||
|
typedef typename BOOST_MPL_AUX_APPLY2(Predicate,State,Iterator)::type not_last;
|
||||||
|
typedef typename iter_fold_if_step_impl<
|
||||||
|
BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value
|
||||||
|
>::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_;
|
||||||
|
|
||||||
|
typedef typename impl_::state state;
|
||||||
|
typedef typename impl_::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// local macros, #undef-ined at the end of the header
|
||||||
|
|
||||||
|
# define AUX_ITER_FOLD_FORWARD_STEP(i, unused) \
|
||||||
|
typedef iter_fold_if_forward_step< \
|
||||||
|
typename BOOST_PP_CAT(forward_step,i)::iterator \
|
||||||
|
, typename BOOST_PP_CAT(forward_step,i)::state \
|
||||||
|
, ForwardOp \
|
||||||
|
, ForwardPredicate \
|
||||||
|
> BOOST_PP_CAT(forward_step, BOOST_PP_INC(i)); \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_ITER_FOLD_BACKWARD_STEP_FUNC(i) \
|
||||||
|
typedef iter_fold_if_backward_step< \
|
||||||
|
typename BOOST_PP_CAT(forward_step,BOOST_PP_DEC(i))::iterator \
|
||||||
|
, typename BOOST_PP_CAT(backward_step,i)::state \
|
||||||
|
, BackwardOp \
|
||||||
|
, BackwardPredicate \
|
||||||
|
> BOOST_PP_CAT(backward_step,BOOST_PP_DEC(i)); \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_ITER_FOLD_BACKWARD_STEP(i, unused) \
|
||||||
|
AUX_ITER_FOLD_BACKWARD_STEP_FUNC( \
|
||||||
|
BOOST_PP_SUB_D(1,BOOST_MPL_UNROLLING_LIMIT,i) \
|
||||||
|
) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_LAST_FORWARD_STEP \
|
||||||
|
BOOST_PP_CAT(forward_step, BOOST_MPL_UNROLLING_LIMIT) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define AUX_LAST_BACKWARD_STEP \
|
||||||
|
BOOST_PP_CAT(backward_step, BOOST_MPL_UNROLLING_LIMIT) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Iterator
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
, typename ForwardPredicate
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename BackwardPredicate
|
||||||
|
>
|
||||||
|
struct iter_fold_if_impl
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef iter_fold_if_null_step<Iterator,State> forward_step0;
|
||||||
|
BOOST_PP_REPEAT_1ST(
|
||||||
|
BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
, AUX_ITER_FOLD_FORWARD_STEP
|
||||||
|
, unused
|
||||||
|
)
|
||||||
|
|
||||||
|
typedef typename if_<
|
||||||
|
typename AUX_LAST_FORWARD_STEP::not_last
|
||||||
|
, iter_fold_if_impl<
|
||||||
|
typename AUX_LAST_FORWARD_STEP::iterator
|
||||||
|
, typename AUX_LAST_FORWARD_STEP::state
|
||||||
|
, ForwardOp
|
||||||
|
, ForwardPredicate
|
||||||
|
, BackwardOp
|
||||||
|
, BackwardPredicate
|
||||||
|
>
|
||||||
|
, iter_fold_if_null_step<
|
||||||
|
typename AUX_LAST_FORWARD_STEP::iterator
|
||||||
|
, typename AUX_LAST_FORWARD_STEP::state
|
||||||
|
>
|
||||||
|
>::type AUX_LAST_BACKWARD_STEP;
|
||||||
|
|
||||||
|
BOOST_PP_REPEAT_1ST(
|
||||||
|
BOOST_MPL_UNROLLING_LIMIT
|
||||||
|
, AUX_ITER_FOLD_BACKWARD_STEP
|
||||||
|
, unused
|
||||||
|
)
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename backward_step0::state state;
|
||||||
|
typedef typename AUX_LAST_BACKWARD_STEP::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
# undef AUX_LAST_BACKWARD_STEP
|
||||||
|
# undef AUX_LAST_FORWARD_STEP
|
||||||
|
# undef AUX_ITER_FOLD_BACKWARD_STEP
|
||||||
|
# undef AUX_ITER_FOLD_BACKWARD_STEP_FUNC
|
||||||
|
# undef AUX_ITER_FOLD_FORWARD_STEP
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
|
||||||
|
#endif // BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED
|
46
include/boost/mpl/aux_/iter_fold_impl.hpp
Normal file
46
include/boost/mpl/aux_/iter_fold_impl.hpp
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/iter_fold_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/apply.hpp"
|
||||||
|
#include "boost/mpl/aux_/next.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/eti.hpp"
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && \
|
||||||
|
!defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include "boost/mpl/if.hpp"
|
||||||
|
# include "boost/type_traits/is_same.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
|
||||||
|
!defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER iter_fold_impl.hpp
|
||||||
|
# include "boost/mpl/aux_/include_preprocessed.hpp"
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_FOLD_IMPL_OP(iter) iter
|
||||||
|
# define BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX iter_fold
|
||||||
|
# include "boost/mpl/aux_/fold_impl_body.hpp"
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
|
||||||
|
#endif // BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED
|
42
include/boost/mpl/aux_/iter_push_front.hpp
Normal file
42
include/boost/mpl/aux_/iter_push_front.hpp
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/iter_push_front.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/push_front.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Sequence
|
||||||
|
, typename Iterator
|
||||||
|
>
|
||||||
|
struct iter_push_front
|
||||||
|
{
|
||||||
|
typedef typename push_front<
|
||||||
|
Sequence
|
||||||
|
, typename Iterator::type
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED
|
33
include/boost/mpl/aux_/iterator_category.hpp
Normal file
33
include/boost/mpl/aux_/iterator_category.hpp
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/iterator_category.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_ITERATOR_CATEGORY_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_ITERATOR_CATEGORY_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/internals.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_INTERNALS_USE_ITERATOR_CATEGORY)
|
||||||
|
|
||||||
|
# include "boost/mpl/iterator_category.hpp"
|
||||||
|
# define BOOST_MPL_AUX_ITERATOR_CATEGORY(iter) iterator_category<iter>::type
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_ITERATOR_CATEGORY(iter) iter::category
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_ITERATOR_CATEGORY_HPP_INCLUDED
|
30
include/boost/mpl/aux_/iterator_names.hpp
Normal file
30
include/boost/mpl/aux_/iterator_names.hpp
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/iterator_names.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_ITERATOR_NAMES_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_ITERATOR_NAMES_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
|
||||||
|
# define BOOST_MPL_AUX_ITERATOR_ADVANCE advance
|
||||||
|
# define BOOST_MPL_AUX_ITERATOR_DISTANCE distance
|
||||||
|
#else
|
||||||
|
# define BOOST_MPL_AUX_ITERATOR_ADVANCE advance_
|
||||||
|
# define BOOST_MPL_AUX_ITERATOR_DISTANCE distance_
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_ITERATOR_NAMES_HPP_INCLUDED
|
28
include/boost/mpl/aux_/lambda_arity_param.hpp
Normal file
28
include/boost/mpl/aux_/lambda_arity_param.hpp
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/lambda_arity_param.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/lambda_support.hpp"
|
||||||
|
|
||||||
|
#if !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
|
||||||
|
# define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param)
|
||||||
|
#else
|
||||||
|
# define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) , param
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED
|
30
include/boost/mpl/aux_/lambda_expr.hpp
Normal file
30
include/boost/mpl/aux_/lambda_expr.hpp
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/lambda_expr.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_LAMBDA_EXPR_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_LAMBDA_EXPR_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/lambda_support.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_NO_LAMBDA_HEURISTIC)
|
||||||
|
# define BOOST_MPL_AUX_IS_LAMBDA_EXPR(value) /**/
|
||||||
|
#else
|
||||||
|
# define BOOST_MPL_AUX_IS_LAMBDA_EXPR(value) \
|
||||||
|
typedef value is_le; \
|
||||||
|
/**/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_LAMBDA_EXPR_HPP_INCLUDED
|
134
include/boost/mpl/aux_/lambda_no_ctps.hpp
Normal file
134
include/boost/mpl/aux_/lambda_no_ctps.hpp
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/lambda_no_ctps.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#if !defined(BOOST_PP_IS_ITERATING)
|
||||||
|
|
||||||
|
///// header body
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include "boost/mpl/lambda_fwd.hpp"
|
||||||
|
# include "boost/mpl/bind.hpp"
|
||||||
|
# include "boost/mpl/protect.hpp"
|
||||||
|
# include "boost/mpl/bool_c.hpp"
|
||||||
|
# include "boost/mpl/aux_/template_arity.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
|
||||||
|
!defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER lambda_no_ctps.hpp
|
||||||
|
# include "boost/mpl/aux_/include_preprocessed.hpp"
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include "boost/mpl/limits/arity.hpp"
|
||||||
|
# include "boost/mpl/aux_/preprocessor/params.hpp"
|
||||||
|
# include "boost/mpl/aux_/preprocessor/repeat.hpp"
|
||||||
|
|
||||||
|
# include "boost/preprocessor/iterate.hpp"
|
||||||
|
# include "boost/preprocessor/inc.hpp"
|
||||||
|
# include "boost/preprocessor/cat.hpp"
|
||||||
|
|
||||||
|
# include "boost/config.hpp"
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
// local macros, #undef-ined at the end of the header
|
||||||
|
# define AUX_LAMBDA_PARAMS(i, param) \
|
||||||
|
BOOST_MPL_PP_PARAMS(i, param) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template< int arity, bool Protect > struct lambda_impl
|
||||||
|
{
|
||||||
|
template< typename T > struct result_
|
||||||
|
{
|
||||||
|
typedef T type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#define BOOST_PP_ITERATION_PARAMS_1 \
|
||||||
|
(3,(1, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/aux_/lambda_no_ctps.hpp"))
|
||||||
|
#include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template< typename T, bool Protect = true >
|
||||||
|
struct lambda
|
||||||
|
#if !defined(BOOST_MSVC) || BOOST_MSVC > 1200
|
||||||
|
: aux::lambda_impl< ::boost::mpl::aux::template_arity<T>::value, Protect >
|
||||||
|
#else
|
||||||
|
: aux::lambda_impl< ::boost::mpl::aux::template_arity<T>::value, bool_c<Protect>::value >
|
||||||
|
#endif
|
||||||
|
::template result_<T>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
# undef AUX_LAMBDA_PARAMS
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
|
||||||
|
#endif // BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
|
||||||
|
|
||||||
|
///// iteration
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define i BOOST_PP_FRAME_ITERATION(1)
|
||||||
|
|
||||||
|
# define AUX_LAMBDA_INVOCATION(i, T) \
|
||||||
|
, typename lambda< \
|
||||||
|
typename f_::BOOST_PP_CAT(arg,BOOST_PP_INC(i)) \
|
||||||
|
, false \
|
||||||
|
>::type \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
template<> struct lambda_impl<i,false>
|
||||||
|
{
|
||||||
|
template< typename F > struct result_
|
||||||
|
{
|
||||||
|
typedef typename F::rebind f_;
|
||||||
|
typedef BOOST_PP_CAT(bind,i)<
|
||||||
|
f_
|
||||||
|
BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct lambda_impl<i,true>
|
||||||
|
{
|
||||||
|
template< typename F > struct result_
|
||||||
|
{
|
||||||
|
typedef typename F::rebind f_;
|
||||||
|
typedef protect< BOOST_PP_CAT(bind,i)<
|
||||||
|
f_
|
||||||
|
BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
|
||||||
|
> > type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# undef AUX_LAMBDA_INVOCATION
|
||||||
|
|
||||||
|
#undef i
|
||||||
|
#endif // BOOST_PP_IS_ITERATING
|
46
include/boost/mpl/aux_/lambda_spec.hpp
Normal file
46
include/boost/mpl/aux_/lambda_spec.hpp
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/lambda_spec.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/lambda_fwd.hpp"
|
||||||
|
#include "boost/mpl/aux_/preprocessor/params.hpp"
|
||||||
|
#include "boost/mpl/aux_/lambda_arity_param.hpp"
|
||||||
|
#include "boost/mpl/aux_/config/lambda_support.hpp"
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) \
|
||||||
|
template< \
|
||||||
|
BOOST_MPL_PP_PARAMS(i, typename T) \
|
||||||
|
> \
|
||||||
|
struct lambda< \
|
||||||
|
name< BOOST_MPL_PP_PARAMS(i, T) > \
|
||||||
|
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(-1) \
|
||||||
|
> \
|
||||||
|
{ \
|
||||||
|
typedef name< BOOST_MPL_PP_PARAMS(i, T) > type; \
|
||||||
|
}; \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) /**/
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED
|
57
include/boost/mpl/aux_/lambda_support.hpp
Normal file
57
include/boost/mpl/aux_/lambda_support.hpp
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/lambda_support.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/config/lambda_support.hpp"
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i,name,params) /**/
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include "boost/mpl/aux_/preprocessor/params.hpp"
|
||||||
|
# include "boost/preprocessor/tuple/to_list.hpp"
|
||||||
|
# include "boost/preprocessor/list/for_each_i.hpp"
|
||||||
|
# include "boost/preprocessor/inc.hpp"
|
||||||
|
# include "boost/preprocessor/cat.hpp"
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC(R,typedef_,i,param) \
|
||||||
|
typedef_ param BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i,name,params) \
|
||||||
|
struct rebind \
|
||||||
|
{ \
|
||||||
|
BOOST_STATIC_CONSTANT(int, arity = i); \
|
||||||
|
BOOST_PP_LIST_FOR_EACH_I( \
|
||||||
|
BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
|
||||||
|
, typedef \
|
||||||
|
, BOOST_PP_TUPLE_TO_LIST(i,params) \
|
||||||
|
) \
|
||||||
|
\
|
||||||
|
template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
|
||||||
|
{ \
|
||||||
|
typedef typename name< BOOST_MPL_PP_PARAMS(i,U) >::type type; \
|
||||||
|
}; \
|
||||||
|
}; \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_NO_FULL_LAMBDA_SUPPORT
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
|
24
include/boost/mpl/aux_/metafunction.hpp
Normal file
24
include/boost/mpl/aux_/metafunction.hpp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/metafunction.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2002
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_METAFUNCTION_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_METAFUNCTION_HPP_INCLUDED
|
||||||
|
|
||||||
|
#define BOOST_MPL_AUX_METAFUNCTION(arity, name) name
|
||||||
|
#define BOOST_MPL_AUX_METAFUNCTION_TRAITS_1(name,T1) /**/
|
||||||
|
#define BOOST_MPL_AUX_METAFUNCTION_TRAITS_2(name,T1,T2) /**/
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_METAFUNCTION_HPP_INCLUDED
|
56
include/boost/mpl/aux_/msvc_dtw.hpp
Normal file
56
include/boost/mpl/aux_/msvc_dtw.hpp
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/msvc_dtw.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
// no include guards, the header is intended for multiple inclusion!
|
||||||
|
|
||||||
|
#include "boost/mpl/aux_/preprocessor/params.hpp"
|
||||||
|
|
||||||
|
// local macros, #undef-ined at the end of the header
|
||||||
|
#define AUX_DTW_PARAMS(param) \
|
||||||
|
BOOST_MPL_PP_PARAMS(BOOST_MPL_AUX_MSVC_DTW_ARITY, param) \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
#define AUX_DTW_ORIGINAL_NAME \
|
||||||
|
BOOST_MPL_AUX_MSVC_DTW_ORIGINAL_NAME \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
// warning: not a well-formed C++
|
||||||
|
// workaround for MSVC 6.5's "dependent template typedef bug"
|
||||||
|
|
||||||
|
template< typename F>
|
||||||
|
struct BOOST_MPL_AUX_MSVC_DTW_NAME
|
||||||
|
{
|
||||||
|
template< bool > struct f_ : F {};
|
||||||
|
template<> struct f_<true>
|
||||||
|
{
|
||||||
|
template< AUX_DTW_PARAMS(typename P) > struct AUX_DTW_ORIGINAL_NAME
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template< AUX_DTW_PARAMS(typename T) > struct result_
|
||||||
|
: f_< aux::msvc_never_true<F>::value >
|
||||||
|
::template AUX_DTW_ORIGINAL_NAME< AUX_DTW_PARAMS(T) >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef AUX_DTW_ORIGINAL_NAME
|
||||||
|
#undef AUX_DTW_PARAMS
|
||||||
|
|
||||||
|
#undef BOOST_MPL_AUX_MSVC_DTW_NAME
|
||||||
|
#undef BOOST_MPL_AUX_MSVC_DTW_ORIGINAL_NAME
|
||||||
|
#undef BOOST_MPL_AUX_MSVC_DTW_ARITY
|
40
include/boost/mpl/aux_/msvc_never_true.hpp
Normal file
40
include/boost/mpl/aux_/msvc_never_true.hpp
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/msvc_never_true.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
struct msvc_never_true
|
||||||
|
{
|
||||||
|
enum { value = false };
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MSVC < 1300
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED
|
40
include/boost/mpl/aux_/nested_type_wknd.hpp
Normal file
40
include/boost/mpl/aux_/nested_type_wknd.hpp
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/nested_type_wknd.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED
|
||||||
|
|
||||||
|
#if defined(__GNUC__) || defined(__BORLANDC__)
|
||||||
|
|
||||||
|
namespace boost { namespace mpl { namespace aux {
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
struct nested_type_wknd
|
||||||
|
: T::type
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
}}} // namespace boost::mpl::aux
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) ::boost::mpl::aux::nested_type_wknd<T>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) T::type
|
||||||
|
|
||||||
|
#endif // __GNUC__
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED
|
34
include/boost/mpl/aux_/next.hpp
Normal file
34
include/boost/mpl/aux_/next.hpp
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/next.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_NEXT_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_NEXT_HPP_INCLUDED
|
||||||
|
|
||||||
|
#if defined(BOOST_MPL_USE_NEXT_INTERNALLY)
|
||||||
|
|
||||||
|
# if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include "boost/mpl/next.hpp"
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_NEXT(x) next<x>::type
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# define BOOST_MPL_AUX_NEXT(x) x::next
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_NEXT_HPP_INCLUDED
|
39
include/boost/mpl/aux_/pop_back_impl.hpp
Normal file
39
include/boost/mpl/aux_/pop_back_impl.hpp
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/pop_back_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_POP_BACK_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_POP_BACK_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/pop_back_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 pop_back_traits
|
||||||
|
{
|
||||||
|
template< typename Sequence > struct algorithm;
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,pop_back_traits)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_POP_BACK_IMPL_HPP_INCLUDED
|
39
include/boost/mpl/aux_/pop_front_impl.hpp
Normal file
39
include/boost/mpl/aux_/pop_front_impl.hpp
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/pop_front_impl.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "boost/mpl/pop_front_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 pop_front_traits
|
||||||
|
{
|
||||||
|
template< typename Sequence > struct algorithm;
|
||||||
|
};
|
||||||
|
|
||||||
|
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,pop_front_traits)
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED
|
39
include/boost/mpl/aux_/pred.hpp
Normal file
39
include/boost/mpl/aux_/pred.hpp
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux/pred.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2001-02
|
||||||
|
// Aleksey Gurtovoy
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, distribute and sell this software
|
||||||
|
// and its documentation for any purpose is hereby granted without fee,
|
||||||
|
// provided that the above copyright notice appears in all copies and
|
||||||
|
// that both the copyright notice and this permission notice appear in
|
||||||
|
// supporting documentation. No representations are made about the
|
||||||
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
|
// without express or implied warranty.
|
||||||
|
|
||||||
|
#ifndef BOOST_MPL_AUX_PRED_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_PRED_HPP_INCLUDED
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
// wrapper class to help users to deal with "legacy" metafunctions
|
||||||
|
// (i.e. the ones that do not provide the '::type' interface)
|
||||||
|
//
|
||||||
|
// usage example: mpl::pred< boost::is_same<mpl::_1, int> >
|
||||||
|
|
||||||
|
template< typename Pred >
|
||||||
|
struct pred : Pred
|
||||||
|
{
|
||||||
|
typedef pred type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_PRED_HPP_INCLUDED
|
83
include/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp
Normal file
83
include/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/aux_/advance_backward.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template< long N > struct advance_backward;
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct advance_backward<0>
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef Iterator iter0;
|
||||||
|
typedef iter0 type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct advance_backward<1>
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef Iterator iter0;
|
||||||
|
typedef typename iter0::prior iter1;
|
||||||
|
typedef iter1 type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct advance_backward<2>
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef Iterator iter0;
|
||||||
|
typedef typename iter0::prior iter1;
|
||||||
|
typedef typename iter1::prior iter2;
|
||||||
|
typedef iter2 type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct advance_backward<3>
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef Iterator iter0;
|
||||||
|
typedef typename iter0::prior iter1;
|
||||||
|
typedef typename iter1::prior iter2;
|
||||||
|
typedef typename iter2::prior iter3;
|
||||||
|
typedef iter3 type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct advance_backward<4>
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef Iterator iter0;
|
||||||
|
typedef typename iter0::prior iter1;
|
||||||
|
typedef typename iter1::prior iter2;
|
||||||
|
typedef typename iter2::prior iter3;
|
||||||
|
typedef typename iter3::prior iter4;
|
||||||
|
typedef iter4 type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template< long N >
|
||||||
|
struct advance_backward
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef typename apply1< advance_backward<4>,Iterator >::type chunk_result_;
|
||||||
|
typedef typename apply1<advance_backward<( (N - 4) < 0 ? 0 : N - 4 )>,chunk_result_>::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
83
include/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp
Normal file
83
include/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/aux_/advance_forward.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template< long N > struct advance_forward;
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct advance_forward<0>
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef Iterator iter0;
|
||||||
|
typedef iter0 type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct advance_forward<1>
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef Iterator iter0;
|
||||||
|
typedef typename iter0::next iter1;
|
||||||
|
typedef iter1 type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct advance_forward<2>
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef Iterator iter0;
|
||||||
|
typedef typename iter0::next iter1;
|
||||||
|
typedef typename iter1::next iter2;
|
||||||
|
typedef iter2 type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct advance_forward<3>
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef Iterator iter0;
|
||||||
|
typedef typename iter0::next iter1;
|
||||||
|
typedef typename iter1::next iter2;
|
||||||
|
typedef typename iter2::next iter3;
|
||||||
|
typedef iter3 type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct advance_forward<4>
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef Iterator iter0;
|
||||||
|
typedef typename iter0::next iter1;
|
||||||
|
typedef typename iter1::next iter2;
|
||||||
|
typedef typename iter2::next iter3;
|
||||||
|
typedef typename iter3::next iter4;
|
||||||
|
typedef iter4 type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template< long N >
|
||||||
|
struct advance_forward
|
||||||
|
{
|
||||||
|
template< typename Iterator > struct apply
|
||||||
|
{
|
||||||
|
typedef typename apply1< advance_forward<4>,Iterator >::type chunk_result_;
|
||||||
|
typedef typename apply1<advance_forward<( (N - 4) < 0 ? 0 : N - 4 )>,chunk_result_>::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
532
include/boost/mpl/aux_/preprocessed/bcc/apply.hpp
Normal file
532
include/boost/mpl/aux_/preprocessed/bcc/apply.hpp
Normal file
@@ -0,0 +1,532 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/apply.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1 = void_, typename T2 = void_
|
||||||
|
, typename T3 = void_, typename T4 = void_, typename T5 = void_
|
||||||
|
>
|
||||||
|
struct apply;
|
||||||
|
|
||||||
|
template< typename F >
|
||||||
|
struct apply0 : F
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct apply0< arg<-1> >
|
||||||
|
{
|
||||||
|
template< typename F > struct apply
|
||||||
|
: F
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F
|
||||||
|
>
|
||||||
|
struct apply< F,void_,void_,void_,void_,void_ >
|
||||||
|
: apply0<F>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
template<
|
||||||
|
int N, typename F, typename T1
|
||||||
|
>
|
||||||
|
struct apply_impl1;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1
|
||||||
|
>
|
||||||
|
struct apply_impl1<
|
||||||
|
1
|
||||||
|
, F
|
||||||
|
, T1
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1
|
||||||
|
>
|
||||||
|
struct apply_impl1<
|
||||||
|
2
|
||||||
|
, F
|
||||||
|
, T1
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1
|
||||||
|
, void_
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1
|
||||||
|
>
|
||||||
|
struct apply_impl1<
|
||||||
|
3
|
||||||
|
, F
|
||||||
|
, T1
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1
|
||||||
|
, void_, void_
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1
|
||||||
|
>
|
||||||
|
struct apply_impl1<
|
||||||
|
4
|
||||||
|
, F
|
||||||
|
, T1
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1
|
||||||
|
, void_, void_, void_
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1
|
||||||
|
>
|
||||||
|
struct apply_impl1<
|
||||||
|
5
|
||||||
|
, F
|
||||||
|
, T1
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1
|
||||||
|
, void_, void_, void_, void_
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1
|
||||||
|
>
|
||||||
|
struct apply1
|
||||||
|
: aux::apply_impl1<
|
||||||
|
::boost::mpl::aux::arity< F,1 >::value
|
||||||
|
, F
|
||||||
|
, T1
|
||||||
|
>::type
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct apply1< arg<-1>,arg<-1> >
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename F, typename T1
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
: F::template apply<
|
||||||
|
T1
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1
|
||||||
|
>
|
||||||
|
struct apply< F,T1,void_,void_,void_,void_ >
|
||||||
|
: apply1< F,T1 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
template<
|
||||||
|
int N, typename F, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct apply_impl2;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct apply_impl2<
|
||||||
|
2
|
||||||
|
, F
|
||||||
|
, T1, T2
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1, T2
|
||||||
|
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct apply_impl2<
|
||||||
|
3
|
||||||
|
, F
|
||||||
|
, T1, T2
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1, T2
|
||||||
|
, void_
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct apply_impl2<
|
||||||
|
4
|
||||||
|
, F
|
||||||
|
, T1, T2
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1, T2
|
||||||
|
, void_, void_
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct apply_impl2<
|
||||||
|
5
|
||||||
|
, F
|
||||||
|
, T1, T2
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1, T2
|
||||||
|
, void_, void_, void_
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct apply2
|
||||||
|
: aux::apply_impl2<
|
||||||
|
::boost::mpl::aux::arity< F,2 >::value
|
||||||
|
, F
|
||||||
|
, T1, T2
|
||||||
|
>::type
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct apply2< arg<-1>,arg<-1>,arg<-1> >
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
: F::template apply<
|
||||||
|
T1, T2
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct apply< F,T1,T2,void_,void_,void_ >
|
||||||
|
: apply2< F,T1,T2 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
template<
|
||||||
|
int N, typename F, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct apply_impl3;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct apply_impl3<
|
||||||
|
3
|
||||||
|
, F
|
||||||
|
, T1, T2, T3
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1, T2, T3
|
||||||
|
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct apply_impl3<
|
||||||
|
4
|
||||||
|
, F
|
||||||
|
, T1, T2, T3
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1, T2, T3
|
||||||
|
, void_
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct apply_impl3<
|
||||||
|
5
|
||||||
|
, F
|
||||||
|
, T1, T2, T3
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1, T2, T3
|
||||||
|
, void_, void_
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct apply3
|
||||||
|
: aux::apply_impl3<
|
||||||
|
::boost::mpl::aux::arity< F,3 >::value
|
||||||
|
, F
|
||||||
|
, T1, T2, T3
|
||||||
|
>::type
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct apply3< arg<-1>,arg<-1>,arg<-1>,arg<-1> >
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
: F::template apply<
|
||||||
|
T1, T2, T3
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct apply< F,T1,T2,T3,void_,void_ >
|
||||||
|
: apply3< F,T1,T2,T3 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
template<
|
||||||
|
int N, typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
>
|
||||||
|
struct apply_impl4;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
>
|
||||||
|
struct apply_impl4<
|
||||||
|
4
|
||||||
|
, F
|
||||||
|
, T1, T2, T3, T4
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1, T2, T3, T4
|
||||||
|
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
>
|
||||||
|
struct apply_impl4<
|
||||||
|
5
|
||||||
|
, F
|
||||||
|
, T1, T2, T3, T4
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1, T2, T3, T4
|
||||||
|
, void_
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
>
|
||||||
|
struct apply4
|
||||||
|
: aux::apply_impl4<
|
||||||
|
::boost::mpl::aux::arity< F,4 >::value
|
||||||
|
, F
|
||||||
|
, T1, T2, T3, T4
|
||||||
|
>::type
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct apply4< arg<-1>,arg<-1>,arg<-1>,arg<-1>,arg<-1> >
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
: F::template apply<
|
||||||
|
T1, T2, T3, T4
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
>
|
||||||
|
struct apply< F,T1,T2,T3,T4,void_ >
|
||||||
|
: apply4< F,T1,T2,T3,T4 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
template<
|
||||||
|
int N, typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5
|
||||||
|
>
|
||||||
|
struct apply_impl5;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5
|
||||||
|
>
|
||||||
|
struct apply_impl5<
|
||||||
|
5
|
||||||
|
, F
|
||||||
|
, T1, T2, T3, T4, T5
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef typename F::template apply<
|
||||||
|
T1, T2, T3, T4, T5
|
||||||
|
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5
|
||||||
|
>
|
||||||
|
struct apply5
|
||||||
|
: aux::apply_impl5<
|
||||||
|
::boost::mpl::aux::arity< F,5 >::value
|
||||||
|
, F
|
||||||
|
, T1, T2, T3, T4, T5
|
||||||
|
>::type
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct apply5< arg<-1>,arg<-1>,arg<-1>,arg<-1>,arg<-1>,arg<-1> >
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
: F::template apply<
|
||||||
|
T1, T2, T3, T4, T5
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// primary template (not a specialization!)
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
: apply5< F,T1,T2,T3,T4,T5 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
131
include/boost/mpl/aux_/preprocessed/bcc/arg.hpp
Normal file
131
include/boost/mpl/aux_/preprocessed/bcc/arg.hpp
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/arg.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<> struct arg<-1>
|
||||||
|
{
|
||||||
|
static int const value = -1;
|
||||||
|
|
||||||
|
typedef void_ tag;
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
typedef U1 type;
|
||||||
|
typedef char arity_constraint[
|
||||||
|
::boost::mpl::aux::reject_if_void_<type>::value
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct arg<1>
|
||||||
|
{
|
||||||
|
static int const value = 1;
|
||||||
|
typedef arg<2> next;
|
||||||
|
typedef void_ tag;
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
typedef U1 type;
|
||||||
|
typedef char arity_constraint[
|
||||||
|
::boost::mpl::aux::reject_if_void_<type>::value
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct arg<2>
|
||||||
|
{
|
||||||
|
static int const value = 2;
|
||||||
|
typedef arg<3> next;
|
||||||
|
typedef void_ tag;
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
typedef U2 type;
|
||||||
|
typedef char arity_constraint[
|
||||||
|
::boost::mpl::aux::reject_if_void_<type>::value
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct arg<3>
|
||||||
|
{
|
||||||
|
static int const value = 3;
|
||||||
|
typedef arg<4> next;
|
||||||
|
typedef void_ tag;
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
typedef U3 type;
|
||||||
|
typedef char arity_constraint[
|
||||||
|
::boost::mpl::aux::reject_if_void_<type>::value
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct arg<4>
|
||||||
|
{
|
||||||
|
static int const value = 4;
|
||||||
|
typedef arg<5> next;
|
||||||
|
typedef void_ tag;
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
typedef U4 type;
|
||||||
|
typedef char arity_constraint[
|
||||||
|
::boost::mpl::aux::reject_if_void_<type>::value
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct arg<5>
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
typedef arg<6> next;
|
||||||
|
typedef void_ tag;
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
typedef U5 type;
|
||||||
|
typedef char arity_constraint[
|
||||||
|
::boost::mpl::aux::reject_if_void_<type>::value
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
template< int N, int A >
|
||||||
|
struct arity< arg<N>,A >
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
0
include/boost/mpl/aux_/preprocessed/bcc/at.hpp
Normal file
0
include/boost/mpl/aux_/preprocessed/bcc/at.hpp
Normal file
459
include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp
Normal file
459
include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp
Normal file
@@ -0,0 +1,459 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/bind.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T, typename U1, typename U2, typename U3, typename U4
|
||||||
|
, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg
|
||||||
|
{
|
||||||
|
typedef T type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1 = void_, typename T2 = void_
|
||||||
|
, typename T3 = void_, typename T4 = void_, typename T5 = void_
|
||||||
|
>
|
||||||
|
struct bind;
|
||||||
|
|
||||||
|
template< typename F, typename T > struct bind1st;
|
||||||
|
template< typename F, typename T > struct bind2nd;
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
int N, typename U1, typename U2, typename U3, typename U4, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg< arg<N>,U1,U2,U3,U4,U5 >
|
||||||
|
{
|
||||||
|
typedef typename apply5< arg<N>,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, typename U1, typename U2, typename U3, typename U4
|
||||||
|
, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg< bind<F,T1,T2,T3,T4,T5>,U1,U2,U3,U4,U5 >
|
||||||
|
{
|
||||||
|
typedef bind< F,T1,T2,T3,T4,T5 > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T, typename U1, typename U2, typename U3
|
||||||
|
, typename U4, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg< bind1st<F,T>,U1,U2,U3,U4,U5 >
|
||||||
|
{
|
||||||
|
typedef bind1st< F,T > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T, typename U1, typename U2, typename U3
|
||||||
|
, typename U4, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 >
|
||||||
|
{
|
||||||
|
typedef bind2nd< F,T > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, int N
|
||||||
|
>
|
||||||
|
struct arity< bind<F,T1,T2,T3,T4,T5>,N >
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
template< typename F, typename T, int N >
|
||||||
|
struct arity< bind1st<F,T>,N >
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
template< typename F, typename T, int N >
|
||||||
|
struct arity< bind2nd<F,T>,N >
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F
|
||||||
|
>
|
||||||
|
struct bind0
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename apply0<f_>::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename U1, typename U2, typename U3, typename U4
|
||||||
|
, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg<
|
||||||
|
bind0<F>,U1, U2, U3, U4, U5
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef bind0<F> f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, int N
|
||||||
|
>
|
||||||
|
struct arity<
|
||||||
|
bind0<F>, N
|
||||||
|
>
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F
|
||||||
|
>
|
||||||
|
struct bind< F,void_,void_,void_,void_,void_ >
|
||||||
|
: bind0<F>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1
|
||||||
|
>
|
||||||
|
struct bind1
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
|
||||||
|
typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename apply1< f_,t1 >::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename U1, typename U2, typename U3
|
||||||
|
, typename U4, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg<
|
||||||
|
bind1< F,T1 >,U1, U2, U3, U4, U5
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef bind1< F,T1 > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, int N
|
||||||
|
>
|
||||||
|
struct arity<
|
||||||
|
bind1< F,T1 >, N
|
||||||
|
>
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1
|
||||||
|
>
|
||||||
|
struct bind< F,T1,void_,void_,void_,void_ >
|
||||||
|
: bind1< F,T1 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct bind2
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
|
||||||
|
typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1;
|
||||||
|
typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename apply2< f_,t1,t2 >::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename U1, typename U2
|
||||||
|
, typename U3, typename U4, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg<
|
||||||
|
bind2< F,T1,T2 >,U1, U2, U3, U4, U5
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef bind2< F,T1,T2 > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, int N
|
||||||
|
>
|
||||||
|
struct arity<
|
||||||
|
bind2< F,T1,T2 >, N
|
||||||
|
>
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct bind< F,T1,T2,void_,void_,void_ >
|
||||||
|
: bind2< F,T1,T2 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct bind3
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
|
||||||
|
typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1;
|
||||||
|
typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2;
|
||||||
|
typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename apply3< f_,t1,t2,t3 >::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename U1
|
||||||
|
, typename U2, typename U3, typename U4, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg<
|
||||||
|
bind3< F,T1,T2,T3 >,U1, U2, U3, U4, U5
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef bind3< F,T1,T2,T3 > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, int N
|
||||||
|
>
|
||||||
|
struct arity<
|
||||||
|
bind3< F,T1,T2,T3 >, N
|
||||||
|
>
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct bind< F,T1,T2,T3,void_,void_ >
|
||||||
|
: bind3< F,T1,T2,T3 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
>
|
||||||
|
struct bind4
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
|
||||||
|
typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1;
|
||||||
|
typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2;
|
||||||
|
typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3;
|
||||||
|
typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename apply4< f_,t1,t2,t3,t4 >::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename U1, typename U2, typename U3, typename U4, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg<
|
||||||
|
bind4< F,T1,T2,T3,T4 >,U1, U2, U3, U4, U5
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef bind4< F,T1,T2,T3,T4 > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4, int N
|
||||||
|
>
|
||||||
|
struct arity<
|
||||||
|
bind4< F,T1,T2,T3,T4 >, N
|
||||||
|
>
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
>
|
||||||
|
struct bind< F,T1,T2,T3,T4,void_ >
|
||||||
|
: bind4< F,T1,T2,T3,T4 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5
|
||||||
|
>
|
||||||
|
struct bind5
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
|
||||||
|
typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1;
|
||||||
|
typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2;
|
||||||
|
typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3;
|
||||||
|
typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4;
|
||||||
|
typedef typename aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 >::type t5;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename apply5< f_,t1,t2,t3,t4,t5 >::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, typename U1, typename U2, typename U3, typename U4
|
||||||
|
, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg<
|
||||||
|
bind5< F,T1,T2,T3,T4,T5 >,U1, U2, U3, U4, U5
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef bind5< F,T1,T2,T3,T4,T5 > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, int N
|
||||||
|
>
|
||||||
|
struct arity<
|
||||||
|
bind5< F,T1,T2,T3,T4,T5 >, N
|
||||||
|
>
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
// primary template (not a specialization!)
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5
|
||||||
|
>
|
||||||
|
struct bind
|
||||||
|
: bind5< F,T1,T2,T3,T4,T5 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template< typename F, typename T >
|
||||||
|
struct bind1st
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
: apply2< F,T,U >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template< typename F, typename T >
|
||||||
|
struct bind2nd
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
: apply2< F,U,T >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
556
include/boost/mpl/aux_/preprocessed/bcc/bind.hpp
Normal file
556
include/boost/mpl/aux_/preprocessed/bcc/bind.hpp
Normal file
@@ -0,0 +1,556 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/bind.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T, typename U1, typename U2, typename U3, typename U4
|
||||||
|
, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg
|
||||||
|
{
|
||||||
|
typedef T type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, typename Arg
|
||||||
|
>
|
||||||
|
struct replace_unnamed_arg
|
||||||
|
{
|
||||||
|
typedef Arg next_arg;
|
||||||
|
typedef T type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Arg
|
||||||
|
>
|
||||||
|
struct replace_unnamed_arg< arg<-1>,Arg >
|
||||||
|
{
|
||||||
|
typedef typename Arg::next next_arg;
|
||||||
|
typedef Arg type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1 = void_, typename T2 = void_
|
||||||
|
, typename T3 = void_, typename T4 = void_, typename T5 = void_
|
||||||
|
>
|
||||||
|
struct bind;
|
||||||
|
|
||||||
|
template< typename F, typename T > struct bind1st;
|
||||||
|
template< typename F, typename T > struct bind2nd;
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
int N, typename U1, typename U2, typename U3, typename U4, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg< arg<N>,U1,U2,U3,U4,U5 >
|
||||||
|
{
|
||||||
|
typedef typename apply5< arg<N>,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, typename U1, typename U2, typename U3, typename U4
|
||||||
|
, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg< bind<F,T1,T2,T3,T4,T5>,U1,U2,U3,U4,U5 >
|
||||||
|
{
|
||||||
|
typedef bind< F,T1,T2,T3,T4,T5 > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T, typename U1, typename U2, typename U3
|
||||||
|
, typename U4, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg< bind1st<F,T>,U1,U2,U3,U4,U5 >
|
||||||
|
{
|
||||||
|
typedef bind1st< F,T > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T, typename U1, typename U2, typename U3
|
||||||
|
, typename U4, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 >
|
||||||
|
{
|
||||||
|
typedef bind2nd< F,T > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, int N
|
||||||
|
>
|
||||||
|
struct arity< bind<F,T1,T2,T3,T4,T5>,N >
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
template< typename F, typename T, int N >
|
||||||
|
struct arity< bind1st<F,T>,N >
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
template< typename F, typename T, int N >
|
||||||
|
struct arity< bind2nd<F,T>,N >
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F
|
||||||
|
>
|
||||||
|
struct bind0
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef aux::replace_unnamed_arg< F,arg<1> > r0;
|
||||||
|
typedef typename r0::type a0;
|
||||||
|
typedef typename r0::next_arg n1;
|
||||||
|
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename apply0<f_>::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename U1, typename U2, typename U3, typename U4
|
||||||
|
, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg<
|
||||||
|
bind0<F>,U1, U2, U3, U4, U5
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef bind0<F> f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, int N
|
||||||
|
>
|
||||||
|
struct arity<
|
||||||
|
bind0<F>, N
|
||||||
|
>
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F
|
||||||
|
>
|
||||||
|
struct bind< F,void_,void_,void_,void_,void_ >
|
||||||
|
: bind0<F>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1
|
||||||
|
>
|
||||||
|
struct bind1
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef aux::replace_unnamed_arg< F,arg<1> > r0;
|
||||||
|
typedef typename r0::type a0;
|
||||||
|
typedef typename r0::next_arg n1;
|
||||||
|
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||||
|
typedef typename r1::type a1;
|
||||||
|
typedef typename r1::next_arg n2;
|
||||||
|
typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename apply1< f_,t1 >::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename U1, typename U2, typename U3
|
||||||
|
, typename U4, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg<
|
||||||
|
bind1< F,T1 >,U1, U2, U3, U4, U5
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef bind1< F,T1 > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, int N
|
||||||
|
>
|
||||||
|
struct arity<
|
||||||
|
bind1< F,T1 >, N
|
||||||
|
>
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1
|
||||||
|
>
|
||||||
|
struct bind< F,T1,void_,void_,void_,void_ >
|
||||||
|
: bind1< F,T1 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct bind2
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef aux::replace_unnamed_arg< F,arg<1> > r0;
|
||||||
|
typedef typename r0::type a0;
|
||||||
|
typedef typename r0::next_arg n1;
|
||||||
|
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||||
|
typedef typename r1::type a1;
|
||||||
|
typedef typename r1::next_arg n2;
|
||||||
|
typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
||||||
|
typedef typename r2::type a2;
|
||||||
|
typedef typename r2::next_arg n3;
|
||||||
|
typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename apply2< f_,t1,t2 >::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename U1, typename U2
|
||||||
|
, typename U3, typename U4, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg<
|
||||||
|
bind2< F,T1,T2 >,U1, U2, U3, U4, U5
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef bind2< F,T1,T2 > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, int N
|
||||||
|
>
|
||||||
|
struct arity<
|
||||||
|
bind2< F,T1,T2 >, N
|
||||||
|
>
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct bind< F,T1,T2,void_,void_,void_ >
|
||||||
|
: bind2< F,T1,T2 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct bind3
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef aux::replace_unnamed_arg< F,arg<1> > r0;
|
||||||
|
typedef typename r0::type a0;
|
||||||
|
typedef typename r0::next_arg n1;
|
||||||
|
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||||
|
typedef typename r1::type a1;
|
||||||
|
typedef typename r1::next_arg n2;
|
||||||
|
typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
||||||
|
typedef typename r2::type a2;
|
||||||
|
typedef typename r2::next_arg n3;
|
||||||
|
typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T3,n3 > r3;
|
||||||
|
typedef typename r3::type a3;
|
||||||
|
typedef typename r3::next_arg n4;
|
||||||
|
typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename apply3< f_,t1,t2,t3 >::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename U1
|
||||||
|
, typename U2, typename U3, typename U4, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg<
|
||||||
|
bind3< F,T1,T2,T3 >,U1, U2, U3, U4, U5
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef bind3< F,T1,T2,T3 > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, int N
|
||||||
|
>
|
||||||
|
struct arity<
|
||||||
|
bind3< F,T1,T2,T3 >, N
|
||||||
|
>
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct bind< F,T1,T2,T3,void_,void_ >
|
||||||
|
: bind3< F,T1,T2,T3 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
>
|
||||||
|
struct bind4
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef aux::replace_unnamed_arg< F,arg<1> > r0;
|
||||||
|
typedef typename r0::type a0;
|
||||||
|
typedef typename r0::next_arg n1;
|
||||||
|
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||||
|
typedef typename r1::type a1;
|
||||||
|
typedef typename r1::next_arg n2;
|
||||||
|
typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
||||||
|
typedef typename r2::type a2;
|
||||||
|
typedef typename r2::next_arg n3;
|
||||||
|
typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T3,n3 > r3;
|
||||||
|
typedef typename r3::type a3;
|
||||||
|
typedef typename r3::next_arg n4;
|
||||||
|
typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T4,n4 > r4;
|
||||||
|
typedef typename r4::type a4;
|
||||||
|
typedef typename r4::next_arg n5;
|
||||||
|
typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename apply4< f_,t1,t2,t3,t4 >::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename U1, typename U2, typename U3, typename U4, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg<
|
||||||
|
bind4< F,T1,T2,T3,T4 >,U1, U2, U3, U4, U5
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef bind4< F,T1,T2,T3,T4 > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4, int N
|
||||||
|
>
|
||||||
|
struct arity<
|
||||||
|
bind4< F,T1,T2,T3,T4 >, N
|
||||||
|
>
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
>
|
||||||
|
struct bind< F,T1,T2,T3,T4,void_ >
|
||||||
|
: bind4< F,T1,T2,T3,T4 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5
|
||||||
|
>
|
||||||
|
struct bind5
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U1 = void_, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef aux::replace_unnamed_arg< F,arg<1> > r0;
|
||||||
|
typedef typename r0::type a0;
|
||||||
|
typedef typename r0::next_arg n1;
|
||||||
|
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||||
|
typedef typename r1::type a1;
|
||||||
|
typedef typename r1::next_arg n2;
|
||||||
|
typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
||||||
|
typedef typename r2::type a2;
|
||||||
|
typedef typename r2::next_arg n3;
|
||||||
|
typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T3,n3 > r3;
|
||||||
|
typedef typename r3::type a3;
|
||||||
|
typedef typename r3::next_arg n4;
|
||||||
|
typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T4,n4 > r4;
|
||||||
|
typedef typename r4::type a4;
|
||||||
|
typedef typename r4::next_arg n5;
|
||||||
|
typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4;
|
||||||
|
|
||||||
|
typedef aux::replace_unnamed_arg< T5,n5 > r5;
|
||||||
|
typedef typename r5::type a5;
|
||||||
|
typedef typename r5::next_arg n6;
|
||||||
|
typedef typename aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 >::type t5;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename apply5< f_,t1,t2,t3,t4,t5 >::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, typename U1, typename U2, typename U3, typename U4
|
||||||
|
, typename U5
|
||||||
|
>
|
||||||
|
struct resolve_bind_arg<
|
||||||
|
bind5< F,T1,T2,T3,T4,T5 >,U1, U2, U3, U4, U5
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef bind5< F,T1,T2,T3,T4,T5 > f_;
|
||||||
|
typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, int N
|
||||||
|
>
|
||||||
|
struct arity<
|
||||||
|
bind5< F,T1,T2,T3,T4,T5 >, N
|
||||||
|
>
|
||||||
|
{
|
||||||
|
static int const value = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
// primary template (not a specialization!)
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5
|
||||||
|
>
|
||||||
|
struct bind
|
||||||
|
: bind5< F,T1,T2,T3,T4,T5 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template< typename F, typename T >
|
||||||
|
struct bind1st
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
: apply2< F,T,U >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template< typename F, typename T >
|
||||||
|
struct bind2nd
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename U, typename U2 = void_, typename U3 = void_
|
||||||
|
, typename U4 = void_, typename U5 = void_
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
: apply2< F,U,T >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
222
include/boost/mpl/aux_/preprocessed/bcc/fold_backward_impl.hpp
Normal file
222
include/boost/mpl/aux_/preprocessed/bcc/fold_backward_impl.hpp
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/aux_/fold_backward_impl.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
// forward declaration
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct fold_backward_impl;
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct fold_backward_impl< 0,First,Last,State,BackwardOp,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
typedef fwd_state0 bkwd_state0;
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef iter0 iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct fold_backward_impl< 1,First,Last,State,BackwardOp,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1;
|
||||||
|
typedef typename iter0::next iter1;
|
||||||
|
|
||||||
|
|
||||||
|
typedef fwd_state1 bkwd_state1;
|
||||||
|
typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0;
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef iter1 iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct fold_backward_impl< 2,First,Last,State,BackwardOp,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1;
|
||||||
|
typedef typename iter0::next iter1;
|
||||||
|
typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2;
|
||||||
|
typedef typename iter1::next iter2;
|
||||||
|
|
||||||
|
|
||||||
|
typedef fwd_state2 bkwd_state2;
|
||||||
|
typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1;
|
||||||
|
typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0;
|
||||||
|
|
||||||
|
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef iter2 iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct fold_backward_impl< 3,First,Last,State,BackwardOp,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1;
|
||||||
|
typedef typename iter0::next iter1;
|
||||||
|
typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2;
|
||||||
|
typedef typename iter1::next iter2;
|
||||||
|
typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3;
|
||||||
|
typedef typename iter2::next iter3;
|
||||||
|
|
||||||
|
|
||||||
|
typedef fwd_state3 bkwd_state3;
|
||||||
|
typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2;
|
||||||
|
typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1;
|
||||||
|
typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0;
|
||||||
|
|
||||||
|
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef iter3 iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct fold_backward_impl< 4,First,Last,State,BackwardOp,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1;
|
||||||
|
typedef typename iter0::next iter1;
|
||||||
|
typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2;
|
||||||
|
typedef typename iter1::next iter2;
|
||||||
|
typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3;
|
||||||
|
typedef typename iter2::next iter3;
|
||||||
|
typedef typename apply2<ForwardOp, fwd_state3, typename iter3::type>::type fwd_state4;
|
||||||
|
typedef typename iter3::next iter4;
|
||||||
|
|
||||||
|
|
||||||
|
typedef fwd_state4 bkwd_state4;
|
||||||
|
typedef typename apply2<BackwardOp, bkwd_state4, typename iter3::type>::type bkwd_state3;
|
||||||
|
typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2;
|
||||||
|
typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1;
|
||||||
|
typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0;
|
||||||
|
|
||||||
|
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef iter4 iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct fold_backward_impl
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1;
|
||||||
|
typedef typename iter0::next iter1;
|
||||||
|
typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2;
|
||||||
|
typedef typename iter1::next iter2;
|
||||||
|
typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3;
|
||||||
|
typedef typename iter2::next iter3;
|
||||||
|
typedef typename apply2<ForwardOp, fwd_state3, typename iter3::type>::type fwd_state4;
|
||||||
|
typedef typename iter3::next iter4;
|
||||||
|
|
||||||
|
|
||||||
|
typedef fold_backward_impl<
|
||||||
|
( (N - 4) < 0 ? 0 : N - 4 )
|
||||||
|
, iter4
|
||||||
|
, Last
|
||||||
|
, fwd_state4
|
||||||
|
, BackwardOp
|
||||||
|
, ForwardOp
|
||||||
|
> nested_chunk;
|
||||||
|
|
||||||
|
typedef typename nested_chunk::state bkwd_state4;
|
||||||
|
typedef typename apply2<BackwardOp, bkwd_state4, typename iter3::type>::type bkwd_state3;
|
||||||
|
typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2;
|
||||||
|
typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1;
|
||||||
|
typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0;
|
||||||
|
|
||||||
|
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef typename nested_chunk::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct fold_backward_impl< -1,First,Last,State,BackwardOp,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef fold_backward_impl<
|
||||||
|
-1
|
||||||
|
, typename First::next
|
||||||
|
, Last
|
||||||
|
, typename apply2<ForwardOp, State, typename First::type>::type
|
||||||
|
, BackwardOp
|
||||||
|
, ForwardOp
|
||||||
|
> nested_step;
|
||||||
|
|
||||||
|
typedef typename apply2<BackwardOp, typename nested_step::state, typename First::type>::type state;
|
||||||
|
typedef typename nested_step::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct fold_backward_impl< -1,Last,Last,State,BackwardOp,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef State state;
|
||||||
|
typedef Last iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
56
include/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp
Normal file
56
include/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/aux_/fold_impl.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
// forward declaration
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct fold_impl;
|
||||||
|
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct fold_impl
|
||||||
|
{
|
||||||
|
typedef fold_impl<
|
||||||
|
-1
|
||||||
|
, typename First::next
|
||||||
|
, Last
|
||||||
|
, typename apply2<ForwardOp, State, typename First::type>::type
|
||||||
|
, ForwardOp
|
||||||
|
> res_;
|
||||||
|
|
||||||
|
typedef typename res_::state state;
|
||||||
|
typedef typename res_::iterator iterator;
|
||||||
|
typedef state type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct fold_impl< N,Last,Last,State,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef State state;
|
||||||
|
typedef Last iterator;
|
||||||
|
typedef state type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
579
include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp
Normal file
579
include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp
Normal file
@@ -0,0 +1,579 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, bool Protect = false
|
||||||
|
|
||||||
|
>
|
||||||
|
struct lambda_impl
|
||||||
|
{
|
||||||
|
typedef false_c is_le;
|
||||||
|
typedef T type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
|
||||||
|
>
|
||||||
|
struct lambda
|
||||||
|
: lambda_impl< T,false >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
|
||||||
|
, bool C5 = false
|
||||||
|
>
|
||||||
|
struct lambda_or
|
||||||
|
: true_c
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct lambda_or< false,false,false,false,false >
|
||||||
|
: false_c
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template< int N, bool Protect >
|
||||||
|
struct lambda_impl< arg<N>,Protect >
|
||||||
|
{
|
||||||
|
typedef true_c is_le;
|
||||||
|
typedef arg<N> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl<
|
||||||
|
bind0<F>
|
||||||
|
, Protect
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef false_c is_le;
|
||||||
|
typedef bind0<
|
||||||
|
F
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
bool IsLE
|
||||||
|
, bool Protect
|
||||||
|
, template< typename P1 > class F
|
||||||
|
, typename L1
|
||||||
|
>
|
||||||
|
struct le_result1
|
||||||
|
{
|
||||||
|
typedef F<
|
||||||
|
typename L1::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1 > class F
|
||||||
|
, typename L1
|
||||||
|
>
|
||||||
|
struct le_result1< true,false,F,L1 >
|
||||||
|
{
|
||||||
|
typedef bind1<
|
||||||
|
meta_fun1<F>
|
||||||
|
, typename L1::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1 > class F
|
||||||
|
, typename L1
|
||||||
|
>
|
||||||
|
struct le_result1< true,true,F,L1 >
|
||||||
|
{
|
||||||
|
typedef protect< bind1<
|
||||||
|
meta_fun1<F>
|
||||||
|
, typename L1::type
|
||||||
|
> > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1 > class F
|
||||||
|
, typename T1
|
||||||
|
>
|
||||||
|
struct lambda< F<T1> >
|
||||||
|
: lambda_impl< F<T1>,true >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1 > class F
|
||||||
|
, typename T1
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl< F<T1>,Protect >
|
||||||
|
{
|
||||||
|
typedef lambda_impl<T1> l1;
|
||||||
|
typedef aux::lambda_or<
|
||||||
|
l1::is_le::value
|
||||||
|
> is_le;
|
||||||
|
|
||||||
|
typedef typename aux::le_result1<
|
||||||
|
is_le::value
|
||||||
|
, Protect
|
||||||
|
, F
|
||||||
|
, l1
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl<
|
||||||
|
bind1< F,T1 >
|
||||||
|
, Protect
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef false_c is_le;
|
||||||
|
typedef bind1<
|
||||||
|
F
|
||||||
|
, T1
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
bool IsLE
|
||||||
|
, bool Protect
|
||||||
|
, template< typename P1, typename P2 > class F
|
||||||
|
, typename L1, typename L2
|
||||||
|
>
|
||||||
|
struct le_result2
|
||||||
|
{
|
||||||
|
typedef F<
|
||||||
|
typename L1::type, typename L2::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2 > class F
|
||||||
|
, typename L1, typename L2
|
||||||
|
>
|
||||||
|
struct le_result2< true,false,F,L1,L2 >
|
||||||
|
{
|
||||||
|
typedef bind2<
|
||||||
|
meta_fun2<F>
|
||||||
|
, typename L1::type, typename L2::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2 > class F
|
||||||
|
, typename L1, typename L2
|
||||||
|
>
|
||||||
|
struct le_result2< true,true,F,L1,L2 >
|
||||||
|
{
|
||||||
|
typedef protect< bind2<
|
||||||
|
meta_fun2<F>
|
||||||
|
, typename L1::type, typename L2::type
|
||||||
|
> > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2 > class F
|
||||||
|
, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct lambda< F<T1,T2> >
|
||||||
|
: lambda_impl< F<T1,T2>,true >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2 > class F
|
||||||
|
, typename T1, typename T2
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl< F<T1,T2>,Protect >
|
||||||
|
{
|
||||||
|
typedef lambda_impl<T1> l1;
|
||||||
|
typedef lambda_impl<T2> l2;
|
||||||
|
|
||||||
|
typedef aux::lambda_or<
|
||||||
|
l1::is_le::value, l2::is_le::value
|
||||||
|
> is_le;
|
||||||
|
|
||||||
|
typedef typename aux::le_result2<
|
||||||
|
is_le::value
|
||||||
|
, Protect
|
||||||
|
, F
|
||||||
|
, l1, l2
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl<
|
||||||
|
bind2< F,T1,T2 >
|
||||||
|
, Protect
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef false_c is_le;
|
||||||
|
typedef bind2<
|
||||||
|
F
|
||||||
|
, T1, T2
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
bool IsLE
|
||||||
|
, bool Protect
|
||||||
|
, template< typename P1, typename P2, typename P3 > class F
|
||||||
|
, typename L1, typename L2, typename L3
|
||||||
|
>
|
||||||
|
struct le_result3
|
||||||
|
{
|
||||||
|
typedef F<
|
||||||
|
typename L1::type, typename L2::type, typename L3::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2, typename P3 > class F
|
||||||
|
, typename L1, typename L2, typename L3
|
||||||
|
>
|
||||||
|
struct le_result3< true,false,F,L1,L2,L3 >
|
||||||
|
{
|
||||||
|
typedef bind3<
|
||||||
|
meta_fun3<F>
|
||||||
|
, typename L1::type, typename L2::type, typename L3::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2, typename P3 > class F
|
||||||
|
, typename L1, typename L2, typename L3
|
||||||
|
>
|
||||||
|
struct le_result3< true,true,F,L1,L2,L3 >
|
||||||
|
{
|
||||||
|
typedef protect< bind3<
|
||||||
|
meta_fun3<F>
|
||||||
|
, typename L1::type, typename L2::type, typename L3::type
|
||||||
|
> > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2, typename P3 > class F
|
||||||
|
, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct lambda< F<T1,T2,T3> >
|
||||||
|
: lambda_impl< F<T1,T2,T3>,true >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2, typename P3 > class F
|
||||||
|
, typename T1, typename T2, typename T3
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl< F<T1,T2,T3>,Protect >
|
||||||
|
{
|
||||||
|
typedef lambda_impl<T1> l1;
|
||||||
|
typedef lambda_impl<T2> l2;
|
||||||
|
typedef lambda_impl<T3> l3;
|
||||||
|
|
||||||
|
typedef aux::lambda_or<
|
||||||
|
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||||
|
> is_le;
|
||||||
|
|
||||||
|
typedef typename aux::le_result3<
|
||||||
|
is_le::value
|
||||||
|
, Protect
|
||||||
|
, F
|
||||||
|
, l1, l2, l3
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl<
|
||||||
|
bind3< F,T1,T2,T3 >
|
||||||
|
, Protect
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef false_c is_le;
|
||||||
|
typedef bind3<
|
||||||
|
F
|
||||||
|
, T1, T2, T3
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
bool IsLE
|
||||||
|
, bool Protect
|
||||||
|
, template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||||
|
, typename L1, typename L2, typename L3, typename L4
|
||||||
|
>
|
||||||
|
struct le_result4
|
||||||
|
{
|
||||||
|
typedef F<
|
||||||
|
typename L1::type, typename L2::type, typename L3::type
|
||||||
|
, typename L4::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||||
|
, typename L1, typename L2, typename L3, typename L4
|
||||||
|
>
|
||||||
|
struct le_result4< true,false,F,L1,L2,L3,L4 >
|
||||||
|
{
|
||||||
|
typedef bind4<
|
||||||
|
meta_fun4<F>
|
||||||
|
, typename L1::type, typename L2::type, typename L3::type
|
||||||
|
, typename L4::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||||
|
, typename L1, typename L2, typename L3, typename L4
|
||||||
|
>
|
||||||
|
struct le_result4< true,true,F,L1,L2,L3,L4 >
|
||||||
|
{
|
||||||
|
typedef protect< bind4<
|
||||||
|
meta_fun4<F>
|
||||||
|
, typename L1::type, typename L2::type, typename L3::type
|
||||||
|
, typename L4::type
|
||||||
|
> > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||||
|
, typename T1, typename T2, typename T3, typename T4
|
||||||
|
>
|
||||||
|
struct lambda< F<T1,T2,T3,T4> >
|
||||||
|
: lambda_impl< F<T1,T2,T3,T4>,true >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||||
|
, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl< F<T1,T2,T3,T4>,Protect >
|
||||||
|
{
|
||||||
|
typedef lambda_impl<T1> l1;
|
||||||
|
typedef lambda_impl<T2> l2;
|
||||||
|
typedef lambda_impl<T3> l3;
|
||||||
|
typedef lambda_impl<T4> l4;
|
||||||
|
|
||||||
|
typedef aux::lambda_or<
|
||||||
|
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||||
|
, l4::is_le::value
|
||||||
|
> is_le;
|
||||||
|
|
||||||
|
typedef typename aux::le_result4<
|
||||||
|
is_le::value
|
||||||
|
, Protect
|
||||||
|
, F
|
||||||
|
, l1, l2, l3, l4
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl<
|
||||||
|
bind4< F,T1,T2,T3,T4 >
|
||||||
|
, Protect
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef false_c is_le;
|
||||||
|
typedef bind4<
|
||||||
|
F
|
||||||
|
, T1, T2, T3, T4
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template<
|
||||||
|
bool IsLE
|
||||||
|
, bool Protect
|
||||||
|
, template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
|
||||||
|
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||||
|
>
|
||||||
|
struct le_result5
|
||||||
|
{
|
||||||
|
typedef F<
|
||||||
|
typename L1::type, typename L2::type, typename L3::type
|
||||||
|
, typename L4::type, typename L5::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template<
|
||||||
|
typename P1, typename P2, typename P3, typename P4
|
||||||
|
, typename P5
|
||||||
|
>
|
||||||
|
class F
|
||||||
|
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||||
|
>
|
||||||
|
struct le_result5< true,false,F,L1,L2,L3,L4,L5 >
|
||||||
|
{
|
||||||
|
typedef bind5<
|
||||||
|
meta_fun5<F>
|
||||||
|
, typename L1::type, typename L2::type, typename L3::type
|
||||||
|
, typename L4::type, typename L5::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template<
|
||||||
|
typename P1, typename P2, typename P3, typename P4
|
||||||
|
, typename P5
|
||||||
|
>
|
||||||
|
class F
|
||||||
|
, typename L1, typename L2, typename L3, typename L4, typename L5
|
||||||
|
>
|
||||||
|
struct le_result5< true,true,F,L1,L2,L3,L4,L5 >
|
||||||
|
{
|
||||||
|
typedef protect< bind5<
|
||||||
|
meta_fun5<F>
|
||||||
|
, typename L1::type, typename L2::type, typename L3::type
|
||||||
|
, typename L4::type, typename L5::type
|
||||||
|
> > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template<
|
||||||
|
template<
|
||||||
|
typename P1, typename P2, typename P3, typename P4
|
||||||
|
, typename P5
|
||||||
|
>
|
||||||
|
class F
|
||||||
|
, typename T1, typename T2, typename T3, typename T4, typename T5
|
||||||
|
>
|
||||||
|
struct lambda< F<T1,T2,T3,T4,T5> >
|
||||||
|
: lambda_impl< F<T1,T2,T3,T4,T5>,true >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template<
|
||||||
|
typename P1, typename P2, typename P3, typename P4
|
||||||
|
, typename P5
|
||||||
|
>
|
||||||
|
class F
|
||||||
|
, typename T1, typename T2, typename T3, typename T4, typename T5
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl< F<T1,T2,T3,T4,T5>,Protect >
|
||||||
|
{
|
||||||
|
typedef lambda_impl<T1> l1;
|
||||||
|
typedef lambda_impl<T2> l2;
|
||||||
|
typedef lambda_impl<T3> l3;
|
||||||
|
typedef lambda_impl<T4> l4;
|
||||||
|
typedef lambda_impl<T5> l5;
|
||||||
|
|
||||||
|
typedef aux::lambda_or<
|
||||||
|
l1::is_le::value, l2::is_le::value, l3::is_le::value
|
||||||
|
, l4::is_le::value, l5::is_le::value
|
||||||
|
> is_le;
|
||||||
|
|
||||||
|
typedef typename aux::le_result5<
|
||||||
|
is_le::value
|
||||||
|
, Protect
|
||||||
|
, F
|
||||||
|
, l1, l2, l3, l4, l5
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl<
|
||||||
|
bind5< F,T1,T2,T3,T4,T5 >
|
||||||
|
, Protect
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef false_c is_le;
|
||||||
|
typedef bind5<
|
||||||
|
F
|
||||||
|
, T1, T2, T3, T4, T5
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// special case for 'protect'
|
||||||
|
template< typename T, bool Protect >
|
||||||
|
struct lambda_impl< protect<T>,Protect >
|
||||||
|
{
|
||||||
|
typedef false_c is_le;
|
||||||
|
typedef protect<T> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// specializations for main 'bind', 'bind1st' and 'bind2nd' forms
|
||||||
|
template<
|
||||||
|
typename F, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl< bind<F,T1,T2,T3,T4,T5>,Protect >
|
||||||
|
{
|
||||||
|
typedef false_c is_le;
|
||||||
|
typedef bind< F,T1,T2,T3,T4,T5 > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl< bind1st<F,T>,Protect >
|
||||||
|
{
|
||||||
|
typedef false_c is_le;
|
||||||
|
typedef bind1st< F,T > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename F, typename T
|
||||||
|
, bool Protect
|
||||||
|
>
|
||||||
|
struct lambda_impl< bind2nd<F,T>,Protect >
|
||||||
|
{
|
||||||
|
typedef false_c is_le;
|
||||||
|
typedef bind2nd< F,T > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
@@ -0,0 +1,222 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/aux_/iter_fold_backward_impl.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
// forward declaration
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct iter_fold_backward_impl;
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct iter_fold_backward_impl< 0,First,Last,State,BackwardOp,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
typedef fwd_state0 bkwd_state0;
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef iter0 iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct iter_fold_backward_impl< 1,First,Last,State,BackwardOp,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
|
||||||
|
typedef typename iter0::next iter1;
|
||||||
|
|
||||||
|
|
||||||
|
typedef fwd_state1 bkwd_state1;
|
||||||
|
typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef iter1 iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct iter_fold_backward_impl< 2,First,Last,State,BackwardOp,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
|
||||||
|
typedef typename iter0::next iter1;
|
||||||
|
typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
|
||||||
|
typedef typename iter1::next iter2;
|
||||||
|
|
||||||
|
|
||||||
|
typedef fwd_state2 bkwd_state2;
|
||||||
|
typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
|
||||||
|
typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
|
||||||
|
|
||||||
|
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef iter2 iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct iter_fold_backward_impl< 3,First,Last,State,BackwardOp,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
|
||||||
|
typedef typename iter0::next iter1;
|
||||||
|
typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
|
||||||
|
typedef typename iter1::next iter2;
|
||||||
|
typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
|
||||||
|
typedef typename iter2::next iter3;
|
||||||
|
|
||||||
|
|
||||||
|
typedef fwd_state3 bkwd_state3;
|
||||||
|
typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
|
||||||
|
typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
|
||||||
|
typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
|
||||||
|
|
||||||
|
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef iter3 iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct iter_fold_backward_impl< 4,First,Last,State,BackwardOp,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
|
||||||
|
typedef typename iter0::next iter1;
|
||||||
|
typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
|
||||||
|
typedef typename iter1::next iter2;
|
||||||
|
typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
|
||||||
|
typedef typename iter2::next iter3;
|
||||||
|
typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
|
||||||
|
typedef typename iter3::next iter4;
|
||||||
|
|
||||||
|
|
||||||
|
typedef fwd_state4 bkwd_state4;
|
||||||
|
typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
|
||||||
|
typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
|
||||||
|
typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
|
||||||
|
typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
|
||||||
|
|
||||||
|
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef iter4 iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct iter_fold_backward_impl
|
||||||
|
{
|
||||||
|
typedef First iter0;
|
||||||
|
typedef State fwd_state0;
|
||||||
|
typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
|
||||||
|
typedef typename iter0::next iter1;
|
||||||
|
typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
|
||||||
|
typedef typename iter1::next iter2;
|
||||||
|
typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
|
||||||
|
typedef typename iter2::next iter3;
|
||||||
|
typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
|
||||||
|
typedef typename iter3::next iter4;
|
||||||
|
|
||||||
|
|
||||||
|
typedef iter_fold_backward_impl<
|
||||||
|
( (N - 4) < 0 ? 0 : N - 4 )
|
||||||
|
, iter4
|
||||||
|
, Last
|
||||||
|
, fwd_state4
|
||||||
|
, BackwardOp
|
||||||
|
, ForwardOp
|
||||||
|
> nested_chunk;
|
||||||
|
|
||||||
|
typedef typename nested_chunk::state bkwd_state4;
|
||||||
|
typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
|
||||||
|
typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
|
||||||
|
typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
|
||||||
|
typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
|
||||||
|
|
||||||
|
|
||||||
|
typedef bkwd_state0 state;
|
||||||
|
typedef typename nested_chunk::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct iter_fold_backward_impl< -1,First,Last,State,BackwardOp,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef iter_fold_backward_impl<
|
||||||
|
-1
|
||||||
|
, typename First::next
|
||||||
|
, Last
|
||||||
|
, typename apply2< ForwardOp,State,First >::type
|
||||||
|
, BackwardOp
|
||||||
|
, ForwardOp
|
||||||
|
> nested_step;
|
||||||
|
|
||||||
|
typedef typename apply2<BackwardOp, typename nested_step::state, First>::type state;
|
||||||
|
typedef typename nested_step::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Last
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct iter_fold_backward_impl< -1,Last,Last,State,BackwardOp,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef State state;
|
||||||
|
typedef Last iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
129
include/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp
Normal file
129
include/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/aux_/iter_fold_if_impl.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template< typename Iterator, typename State >
|
||||||
|
struct iter_fold_if_null_step
|
||||||
|
{
|
||||||
|
typedef State state;
|
||||||
|
typedef Iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template< bool >
|
||||||
|
struct iter_fold_if_step_impl
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename Iterator
|
||||||
|
, typename State
|
||||||
|
, typename StateOp
|
||||||
|
, typename IteratorOp
|
||||||
|
>
|
||||||
|
struct result_
|
||||||
|
{
|
||||||
|
typedef typename apply2< StateOp,State,Iterator >::type state;
|
||||||
|
typedef typename IteratorOp::type iterator;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct iter_fold_if_step_impl<false>
|
||||||
|
{
|
||||||
|
template<
|
||||||
|
typename Iterator
|
||||||
|
, typename State
|
||||||
|
, typename StateOp
|
||||||
|
, typename IteratorOp
|
||||||
|
>
|
||||||
|
struct result_
|
||||||
|
{
|
||||||
|
typedef State state;
|
||||||
|
typedef Iterator iterator;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Iterator
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
, typename Predicate
|
||||||
|
>
|
||||||
|
struct iter_fold_if_forward_step
|
||||||
|
{
|
||||||
|
typedef typename apply2< Predicate,State,Iterator >::type not_last;
|
||||||
|
typedef typename iter_fold_if_step_impl<
|
||||||
|
BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value
|
||||||
|
>::template result_< Iterator,State,ForwardOp,next<Iterator> > impl_;
|
||||||
|
|
||||||
|
typedef typename impl_::state state;
|
||||||
|
typedef typename impl_::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Iterator
|
||||||
|
, typename State
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename Predicate
|
||||||
|
>
|
||||||
|
struct iter_fold_if_backward_step
|
||||||
|
{
|
||||||
|
typedef typename apply2< Predicate,State,Iterator >::type not_last;
|
||||||
|
typedef typename iter_fold_if_step_impl<
|
||||||
|
BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value
|
||||||
|
>::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_;
|
||||||
|
|
||||||
|
typedef typename impl_::state state;
|
||||||
|
typedef typename impl_::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Iterator
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
, typename ForwardPredicate
|
||||||
|
, typename BackwardOp
|
||||||
|
, typename BackwardPredicate
|
||||||
|
>
|
||||||
|
struct iter_fold_if_impl
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef iter_fold_if_null_step< Iterator,State > forward_step0;
|
||||||
|
typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1;
|
||||||
|
typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2;
|
||||||
|
typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3;
|
||||||
|
typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4;
|
||||||
|
|
||||||
|
|
||||||
|
typedef typename if_<
|
||||||
|
typename forward_step4::not_last
|
||||||
|
, iter_fold_if_impl<
|
||||||
|
typename forward_step4::iterator
|
||||||
|
, typename forward_step4::state
|
||||||
|
, ForwardOp
|
||||||
|
, ForwardPredicate
|
||||||
|
, BackwardOp
|
||||||
|
, BackwardPredicate
|
||||||
|
>
|
||||||
|
, iter_fold_if_null_step<
|
||||||
|
typename forward_step4::iterator
|
||||||
|
, typename forward_step4::state
|
||||||
|
>
|
||||||
|
>::type backward_step4;
|
||||||
|
|
||||||
|
typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3;
|
||||||
|
typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2;
|
||||||
|
typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1;
|
||||||
|
typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef typename backward_step0::state state;
|
||||||
|
typedef typename backward_step4::iterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
56
include/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp
Normal file
56
include/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/aux_/iter_fold_impl.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
// forward declaration
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct iter_fold_impl;
|
||||||
|
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename First
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct iter_fold_impl
|
||||||
|
{
|
||||||
|
typedef iter_fold_impl<
|
||||||
|
-1
|
||||||
|
, typename First::next
|
||||||
|
, Last
|
||||||
|
, typename apply2< ForwardOp,State,First >::type
|
||||||
|
, ForwardOp
|
||||||
|
> res_;
|
||||||
|
|
||||||
|
typedef typename res_::state state;
|
||||||
|
typedef typename res_::iterator iterator;
|
||||||
|
typedef state type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
long N
|
||||||
|
, typename Last
|
||||||
|
, typename State
|
||||||
|
, typename ForwardOp
|
||||||
|
>
|
||||||
|
struct iter_fold_impl< N,Last,Last,State,ForwardOp >
|
||||||
|
{
|
||||||
|
typedef State state;
|
||||||
|
typedef Last iterator;
|
||||||
|
typedef state type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
120
include/boost/mpl/aux_/preprocessed/bcc/lambda_helper.hpp
Normal file
120
include/boost/mpl/aux_/preprocessed/bcc/lambda_helper.hpp
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/lambda_helper.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1 > class F
|
||||||
|
, typename T1
|
||||||
|
>
|
||||||
|
struct lambda_helper1
|
||||||
|
{
|
||||||
|
struct rebind
|
||||||
|
{
|
||||||
|
static int const arity = 1;
|
||||||
|
typedef T1 arg1;
|
||||||
|
|
||||||
|
template< typename U1 > struct apply
|
||||||
|
: F<U1>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2 > class F
|
||||||
|
, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct lambda_helper2
|
||||||
|
{
|
||||||
|
struct rebind
|
||||||
|
{
|
||||||
|
static int const arity = 2;
|
||||||
|
typedef T1 arg1;
|
||||||
|
typedef T2 arg2;
|
||||||
|
|
||||||
|
template< typename U1, typename U2 > struct apply
|
||||||
|
: F< U1,U2 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2, typename P3 > class F
|
||||||
|
, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct lambda_helper3
|
||||||
|
{
|
||||||
|
struct rebind
|
||||||
|
{
|
||||||
|
static int const arity = 3;
|
||||||
|
typedef T1 arg1;
|
||||||
|
typedef T2 arg2;
|
||||||
|
typedef T3 arg3;
|
||||||
|
|
||||||
|
template< typename U1, typename U2, typename U3 > struct apply
|
||||||
|
: F< U1,U2,U3 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||||
|
, typename T1, typename T2, typename T3, typename T4
|
||||||
|
>
|
||||||
|
struct lambda_helper4
|
||||||
|
{
|
||||||
|
struct rebind
|
||||||
|
{
|
||||||
|
static int const arity = 4;
|
||||||
|
typedef T1 arg1;
|
||||||
|
typedef T2 arg2;
|
||||||
|
typedef T3 arg3;
|
||||||
|
typedef T4 arg4;
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename U1, typename U2, typename U3, typename U4
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
: F< U1,U2,U3,U4 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
template<
|
||||||
|
typename P1, typename P2, typename P3, typename P4
|
||||||
|
, typename P5
|
||||||
|
>
|
||||||
|
class F
|
||||||
|
, typename T1, typename T2, typename T3, typename T4, typename T5
|
||||||
|
>
|
||||||
|
struct lambda_helper5
|
||||||
|
{
|
||||||
|
struct rebind
|
||||||
|
{
|
||||||
|
static int const arity = 5;
|
||||||
|
typedef T1 arg1;
|
||||||
|
typedef T2 arg2;
|
||||||
|
typedef T3 arg3;
|
||||||
|
typedef T4 arg4;
|
||||||
|
typedef T5 arg5;
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename U1, typename U2, typename U3, typename U4
|
||||||
|
, typename U5
|
||||||
|
>
|
||||||
|
struct apply
|
||||||
|
: F< U1,U2,U3,U4,U5 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
158
include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp
Normal file
158
include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/lambda_no_ctps.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template< int arity, bool Protect > struct lambda_impl
|
||||||
|
{
|
||||||
|
template< typename T > struct result_
|
||||||
|
{
|
||||||
|
typedef T type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct lambda_impl<1, false>
|
||||||
|
{
|
||||||
|
template< typename F > struct result_
|
||||||
|
{
|
||||||
|
typedef typename F::rebind f_;
|
||||||
|
typedef bind1<
|
||||||
|
f_
|
||||||
|
, typename lambda< typename f_::arg1, false >::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct lambda_impl<1, true>
|
||||||
|
{
|
||||||
|
template< typename F > struct result_
|
||||||
|
{
|
||||||
|
typedef typename F::rebind f_;
|
||||||
|
typedef protect< bind1<
|
||||||
|
f_
|
||||||
|
, typename lambda< typename f_::arg1, false >::type
|
||||||
|
> > type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct lambda_impl<2, false>
|
||||||
|
{
|
||||||
|
template< typename F > struct result_
|
||||||
|
{
|
||||||
|
typedef typename F::rebind f_;
|
||||||
|
typedef bind2<
|
||||||
|
f_
|
||||||
|
|
||||||
|
,typename lambda< typename f_::arg1, false >::type, typename lambda< typename f_::arg2, false >::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct lambda_impl<2, true>
|
||||||
|
{
|
||||||
|
template< typename F > struct result_
|
||||||
|
{
|
||||||
|
typedef typename F::rebind f_;
|
||||||
|
typedef protect< bind2<
|
||||||
|
f_
|
||||||
|
|
||||||
|
,typename lambda< typename f_::arg1, false >::type, typename lambda< typename f_::arg2, false >::type
|
||||||
|
> > type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct lambda_impl<3, false>
|
||||||
|
{
|
||||||
|
template< typename F > struct result_
|
||||||
|
{
|
||||||
|
typedef typename F::rebind f_;
|
||||||
|
typedef bind3<
|
||||||
|
f_
|
||||||
|
|
||||||
|
,typename lambda< typename f_::arg1, false >::type, typename lambda< typename f_::arg2, false >::type, typename lambda< typename f_::arg3, false >::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct lambda_impl<3, true>
|
||||||
|
{
|
||||||
|
template< typename F > struct result_
|
||||||
|
{
|
||||||
|
typedef typename F::rebind f_;
|
||||||
|
typedef protect< bind3<
|
||||||
|
f_
|
||||||
|
|
||||||
|
,typename lambda< typename f_::arg1, false >::type, typename lambda< typename f_::arg2, false >::type, typename lambda< typename f_::arg3, false >::type
|
||||||
|
> > type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct lambda_impl<4, false>
|
||||||
|
{
|
||||||
|
template< typename F > struct result_
|
||||||
|
{
|
||||||
|
typedef typename F::rebind f_;
|
||||||
|
typedef bind4<
|
||||||
|
f_
|
||||||
|
|
||||||
|
,typename lambda< typename f_::arg1, false >::type, typename lambda< typename f_::arg2, false >::type, typename lambda< typename f_::arg3, false >::type, typename lambda< typename f_::arg4, false >::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct lambda_impl<4, true>
|
||||||
|
{
|
||||||
|
template< typename F > struct result_
|
||||||
|
{
|
||||||
|
typedef typename F::rebind f_;
|
||||||
|
typedef protect< bind4<
|
||||||
|
f_
|
||||||
|
|
||||||
|
,typename lambda< typename f_::arg1, false >::type, typename lambda< typename f_::arg2, false >::type, typename lambda< typename f_::arg3, false >::type, typename lambda< typename f_::arg4, false >::type
|
||||||
|
> > type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct lambda_impl<5, false>
|
||||||
|
{
|
||||||
|
template< typename F > struct result_
|
||||||
|
{
|
||||||
|
typedef typename F::rebind f_;
|
||||||
|
typedef bind5<
|
||||||
|
f_
|
||||||
|
|
||||||
|
,typename lambda< typename f_::arg1, false >::type, typename lambda< typename f_::arg2, false >::type, typename lambda< typename f_::arg3, false >::type, typename lambda< typename f_::arg4, false >::type, typename lambda< typename f_::arg5, false >::type
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct lambda_impl<5, true>
|
||||||
|
{
|
||||||
|
template< typename F > struct result_
|
||||||
|
{
|
||||||
|
typedef typename F::rebind f_;
|
||||||
|
typedef protect< bind5<
|
||||||
|
f_
|
||||||
|
|
||||||
|
,typename lambda< typename f_::arg1, false >::type, typename lambda< typename f_::arg2, false >::type, typename lambda< typename f_::arg3, false >::type, typename lambda< typename f_::arg4, false >::type, typename lambda< typename f_::arg5, false >::type
|
||||||
|
> > type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template< typename T, bool Protect = true >
|
||||||
|
struct lambda
|
||||||
|
|
||||||
|
: aux::lambda_impl< ::boost::mpl::aux::template_arity<T>::value, Protect >
|
||||||
|
|
||||||
|
::template result_<T>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
129
include/boost/mpl/aux_/preprocessed/bcc/list.hpp
Normal file
129
include/boost/mpl/aux_/preprocessed/bcc/list.hpp
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/list.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0 = void_, typename T1 = void_, typename T2 = void_
|
||||||
|
, typename T3 = void_, typename T4 = void_, typename T5 = void_
|
||||||
|
, typename T6 = void_, typename T7 = void_, typename T8 = void_
|
||||||
|
, typename T9 = void_
|
||||||
|
>
|
||||||
|
struct list;
|
||||||
|
|
||||||
|
template<
|
||||||
|
|
||||||
|
>
|
||||||
|
struct list<
|
||||||
|
void_, void_, void_, void_, void_, void_, void_, void_, void_
|
||||||
|
, void_
|
||||||
|
>
|
||||||
|
: list0< >
|
||||||
|
{
|
||||||
|
typedef list0< > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0
|
||||||
|
>
|
||||||
|
struct list<
|
||||||
|
T0, void_, void_, void_, void_, void_, void_, void_, void_, void_
|
||||||
|
>
|
||||||
|
: list1<T0>
|
||||||
|
{
|
||||||
|
typedef list1<T0> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1
|
||||||
|
>
|
||||||
|
struct list<
|
||||||
|
T0, T1, void_, void_, void_, void_, void_, void_, void_, void_
|
||||||
|
>
|
||||||
|
: list2< T0,T1 >
|
||||||
|
{
|
||||||
|
typedef list2< T0,T1 > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ >
|
||||||
|
: list3< T0,T1,T2 >
|
||||||
|
{
|
||||||
|
typedef list3< T0,T1,T2 > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ >
|
||||||
|
: list4< T0,T1,T2,T3 >
|
||||||
|
{
|
||||||
|
typedef list4< T0,T1,T2,T3 > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||||
|
>
|
||||||
|
struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ >
|
||||||
|
: list5< T0,T1,T2,T3,T4 >
|
||||||
|
{
|
||||||
|
typedef list5< T0,T1,T2,T3,T4 > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5
|
||||||
|
>
|
||||||
|
struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ >
|
||||||
|
: list6< T0,T1,T2,T3,T4,T5 >
|
||||||
|
{
|
||||||
|
typedef list6< T0,T1,T2,T3,T4,T5 > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, typename T6
|
||||||
|
>
|
||||||
|
struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ >
|
||||||
|
: list7< T0,T1,T2,T3,T4,T5,T6 >
|
||||||
|
{
|
||||||
|
typedef list7< T0,T1,T2,T3,T4,T5,T6 > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, typename T6, typename T7
|
||||||
|
>
|
||||||
|
struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ >
|
||||||
|
: list8< T0,T1,T2,T3,T4,T5,T6,T7 >
|
||||||
|
{
|
||||||
|
typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, typename T6, typename T7, typename T8
|
||||||
|
>
|
||||||
|
struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ >
|
||||||
|
: list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
|
||||||
|
{
|
||||||
|
typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// primary template (not a specialization!)
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||||
|
>
|
||||||
|
struct list
|
||||||
|
: list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
|
||||||
|
{
|
||||||
|
typedef list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
144
include/boost/mpl/aux_/preprocessed/bcc/list10.hpp
Normal file
144
include/boost/mpl/aux_/preprocessed/bcc/list10.hpp
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/list/list10.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0
|
||||||
|
>
|
||||||
|
struct list1
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,1 >
|
||||||
|
, T0
|
||||||
|
, null_node
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list1 type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1
|
||||||
|
>
|
||||||
|
struct list2
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,2 >
|
||||||
|
, T0
|
||||||
|
, list1<T1>
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list2 type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2
|
||||||
|
>
|
||||||
|
struct list3
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,3 >
|
||||||
|
, T0
|
||||||
|
, list2< T1,T2 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list3 type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2, typename T3
|
||||||
|
>
|
||||||
|
struct list4
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,4 >
|
||||||
|
, T0
|
||||||
|
, list3< T1,T2,T3 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list4 type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||||
|
>
|
||||||
|
struct list5
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,5 >
|
||||||
|
, T0
|
||||||
|
, list4< T1,T2,T3,T4 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list5 type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5
|
||||||
|
>
|
||||||
|
struct list6
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,6 >
|
||||||
|
, T0
|
||||||
|
, list5< T1,T2,T3,T4,T5 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list6 type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, typename T6
|
||||||
|
>
|
||||||
|
struct list7
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,7 >
|
||||||
|
, T0
|
||||||
|
, list6< T1,T2,T3,T4,T5,T6 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list7 type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, typename T6, typename T7
|
||||||
|
>
|
||||||
|
struct list8
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,8 >
|
||||||
|
, T0
|
||||||
|
, list7< T1,T2,T3,T4,T5,T6,T7 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list8 type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, typename T6, typename T7, typename T8
|
||||||
|
>
|
||||||
|
struct list9
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,9 >
|
||||||
|
, T0
|
||||||
|
, list8< T1,T2,T3,T4,T5,T6,T7,T8 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list9 type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||||
|
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||||
|
>
|
||||||
|
struct list10
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,10 >
|
||||||
|
, T0
|
||||||
|
, list9< T1,T2,T3,T4,T5,T6,T7,T8,T9 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list10 type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
149
include/boost/mpl/aux_/preprocessed/bcc/list10_c.hpp
Normal file
149
include/boost/mpl/aux_/preprocessed/bcc/list10_c.hpp
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
// preprocessed version of 'boost/mpl/list/list10_c.hpp' header
|
||||||
|
// see the original for copyright information
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace mpl {
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, T C0
|
||||||
|
>
|
||||||
|
struct list1_c
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,1 >
|
||||||
|
, integral_c< T,C0 >
|
||||||
|
, null_node
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list1_c type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, T C0, T C1
|
||||||
|
>
|
||||||
|
struct list2_c
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,2 >
|
||||||
|
, integral_c< T,C0 >
|
||||||
|
, list1_c< T,C1 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list2_c type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, T C0, T C1, T C2
|
||||||
|
>
|
||||||
|
struct list3_c
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,3 >
|
||||||
|
, integral_c< T,C0 >
|
||||||
|
, list2_c< T,C1,C2 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list3_c type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, T C0, T C1, T C2, T C3
|
||||||
|
>
|
||||||
|
struct list4_c
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,4 >
|
||||||
|
, integral_c< T,C0 >
|
||||||
|
, list3_c< T,C1,C2,C3 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list4_c type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, T C0, T C1, T C2, T C3, T C4
|
||||||
|
>
|
||||||
|
struct list5_c
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,5 >
|
||||||
|
, integral_c< T,C0 >
|
||||||
|
, list4_c< T,C1,C2,C3,C4 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list5_c type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, T C0, T C1, T C2, T C3, T C4, T C5
|
||||||
|
>
|
||||||
|
struct list6_c
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,6 >
|
||||||
|
, integral_c< T,C0 >
|
||||||
|
, list5_c< T,C1,C2,C3,C4,C5 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list6_c type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, T C0, T C1, T C2, T C3, T C4, T C5, T C6
|
||||||
|
>
|
||||||
|
struct list7_c
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,7 >
|
||||||
|
, integral_c< T,C0 >
|
||||||
|
, list6_c< T,C1,C2,C3,C4,C5,C6 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list7_c type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7
|
||||||
|
>
|
||||||
|
struct list8_c
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,8 >
|
||||||
|
, integral_c< T,C0 >
|
||||||
|
, list7_c< T,C1,C2,C3,C4,C5,C6,C7 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list8_c type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8
|
||||||
|
>
|
||||||
|
struct list9_c
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,9 >
|
||||||
|
, integral_c< T,C0 >
|
||||||
|
, list8_c< T,C1,C2,C3,C4,C5,C6,C7,C8 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list9_c type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9
|
||||||
|
>
|
||||||
|
struct list10_c
|
||||||
|
: list_node<
|
||||||
|
integral_c< long,10 >
|
||||||
|
, integral_c< T,C0 >
|
||||||
|
, list9_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef list10_c type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace mpl
|
||||||
|
} // namespace boost
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user