mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-02 14:24:30 +02:00
merge RC_1_32_0 fixes
[SVN r26325]
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
#define BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED
|
#define BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED
|
||||||
|
|
||||||
// Copyright Eric Friedman 2003
|
// Copyright Eric Friedman 2003
|
||||||
|
// Copyright Aleksey Gurtovoy 2004
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@@ -18,33 +19,28 @@
|
|||||||
#include <boost/mpl/eval_if.hpp>
|
#include <boost/mpl/eval_if.hpp>
|
||||||
#include <boost/mpl/if.hpp>
|
#include <boost/mpl/if.hpp>
|
||||||
#include <boost/mpl/pair.hpp>
|
#include <boost/mpl/pair.hpp>
|
||||||
#include <boost/mpl/deref.hpp>
|
|
||||||
#include <boost/mpl/push_front.hpp>
|
|
||||||
#include <boost/mpl/aux_/lambda_spec.hpp>
|
#include <boost/mpl/aux_/lambda_spec.hpp>
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
namespace aux {
|
namespace aux {
|
||||||
|
|
||||||
template <typename Predicate>
|
template< typename Pred, typename In1Op, typename In2Op >
|
||||||
struct partition_op
|
struct partition_op
|
||||||
{
|
{
|
||||||
template <typename State, typename Iter>
|
template< typename State, typename T >
|
||||||
struct apply
|
struct apply
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
typedef typename State::first first_;
|
typedef typename State::first first_;
|
||||||
typedef typename State::second second_;
|
typedef typename State::second second_;
|
||||||
typedef typename deref<Iter>::type t_;
|
typedef typename apply1< Pred,T >::type pred_;
|
||||||
typedef typename apply1< Predicate,t_ >::type pred_;
|
|
||||||
|
|
||||||
typedef typename eval_if<
|
typedef typename eval_if<
|
||||||
pred_
|
pred_
|
||||||
, push_front< first_, t_ >
|
, apply2<In1Op,first_,T>
|
||||||
, push_front< second_, t_ >
|
, apply2<In2Op,second_,T>
|
||||||
>::type result_;
|
>::type result_;
|
||||||
|
|
||||||
public:
|
|
||||||
typedef typename if_<
|
typedef typename if_<
|
||||||
pred_
|
pred_
|
||||||
, pair< result_,second_ >
|
, pair< result_,second_ >
|
||||||
@@ -55,7 +51,7 @@ struct partition_op
|
|||||||
|
|
||||||
} // namespace aux
|
} // namespace aux
|
||||||
|
|
||||||
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,aux::partition_op)
|
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::partition_op)
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@@ -36,6 +36,10 @@
|
|||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
|
#if !defined(AUX778076_SEQUENCE_BASE_NAME)
|
||||||
|
# define AUX778076_SEQUENCE_BASE_NAME AUX778076_SEQUENCE_NAME
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER)
|
#if !defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER)
|
||||||
|
|
||||||
# define AUX778076_SEQUENCE_PARAM_NAME T
|
# define AUX778076_SEQUENCE_PARAM_NAME T
|
||||||
@@ -43,7 +47,7 @@ namespace boost { namespace mpl {
|
|||||||
# define AUX778076_SEQUENCE_DEFAULT na
|
# define AUX778076_SEQUENCE_DEFAULT na
|
||||||
|
|
||||||
# define AUX778076_SEQUENCE_NAME_N(n) \
|
# define AUX778076_SEQUENCE_NAME_N(n) \
|
||||||
BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,n) \
|
BOOST_PP_CAT(AUX778076_SEQUENCE_BASE_NAME,n) \
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
# define AUX778076_SEQUENCE_PARAMS() \
|
# define AUX778076_SEQUENCE_PARAMS() \
|
||||||
@@ -209,6 +213,7 @@ struct AUX778076_SEQUENCE_NAME
|
|||||||
# undef AUX778076_SEQUENCE_TEMPLATE_PARAM
|
# undef AUX778076_SEQUENCE_TEMPLATE_PARAM
|
||||||
# undef AUX778076_SEQUENCE_PARAM_NAME
|
# undef AUX778076_SEQUENCE_PARAM_NAME
|
||||||
# undef AUX778076_SEQUENCE_LIMIT
|
# undef AUX778076_SEQUENCE_LIMIT
|
||||||
|
# undef AUX778076_SEQUENCE_BASE_NAME
|
||||||
# undef AUX778076_SEQUENCE_NAME
|
# undef AUX778076_SEQUENCE_NAME
|
||||||
# undef AUX778076_SEQUENCE_INTEGRAL_WRAPPER
|
# undef AUX778076_SEQUENCE_INTEGRAL_WRAPPER
|
||||||
|
|
||||||
|
@@ -15,104 +15,104 @@
|
|||||||
// $Revision$
|
// $Revision$
|
||||||
|
|
||||||
#include <boost/mpl/iterator_tags.hpp>
|
#include <boost/mpl/iterator_tags.hpp>
|
||||||
#include <boost/mpl/plus.hpp>
|
#include <boost/mpl/advance_fwd.hpp>
|
||||||
#include <boost/mpl/minus.hpp>
|
#include <boost/mpl/distance_fwd.hpp>
|
||||||
|
#include <boost/mpl/next_prior.hpp>
|
||||||
|
#include <boost/mpl/deref.hpp>
|
||||||
#include <boost/mpl/int.hpp>
|
#include <boost/mpl/int.hpp>
|
||||||
#include <boost/mpl/aux_/value_wknd.hpp>
|
|
||||||
#include <boost/mpl/aux_/iterator_names.hpp>
|
|
||||||
#include <boost/mpl/aux_/lambda_spec.hpp>
|
|
||||||
#include <boost/mpl/aux_/config/ctps.hpp>
|
|
||||||
#include <boost/mpl/aux_/nttp_decl.hpp>
|
#include <boost/mpl/aux_/nttp_decl.hpp>
|
||||||
|
#include <boost/mpl/aux_/value_wknd.hpp>
|
||||||
|
#include <boost/mpl/aux_/config/ctps.hpp>
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
namespace aux {
|
|
||||||
|
|
||||||
template< typename T, int N >
|
|
||||||
struct single_element_iter;
|
|
||||||
|
|
||||||
// random access support
|
|
||||||
template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, N) >
|
|
||||||
struct single_iter_base
|
|
||||||
{
|
|
||||||
typedef random_access_iterator_tag category;
|
|
||||||
typedef mpl::int_<N> position;
|
|
||||||
|
|
||||||
template< typename D >
|
|
||||||
struct BOOST_MPL_AUX_ITERATOR_ADVANCE
|
|
||||||
{
|
|
||||||
typedef plus< mpl::int_<N>,D > n_;
|
|
||||||
typedef single_element_iter<
|
|
||||||
T
|
|
||||||
, BOOST_MPL_AUX_VALUE_WKND(n_)::value
|
|
||||||
> type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template< typename U >
|
|
||||||
struct BOOST_MPL_AUX_ITERATOR_DISTANCE
|
|
||||||
{
|
|
||||||
typedef typename minus<
|
|
||||||
typename U::position
|
|
||||||
, mpl::int_<N>
|
|
||||||
>::type type;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
|
template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, is_last_) >
|
||||||
|
struct sel_iter;
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
struct single_element_iter<T,0>
|
struct sel_iter<T,0>
|
||||||
: single_iter_base<T,0>
|
|
||||||
{
|
{
|
||||||
typedef single_element_iter<T,1> next;
|
typedef random_access_iterator_tag category;
|
||||||
|
typedef sel_iter<T,1> next;
|
||||||
typedef T type;
|
typedef T type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
struct single_element_iter<T,1>
|
struct sel_iter<T,1>
|
||||||
: single_iter_base<T,1>
|
{
|
||||||
|
typedef random_access_iterator_tag category;
|
||||||
|
typedef sel_iter<T,0> prior;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, is_last_), typename Distance >
|
||||||
|
struct advance< aux::sel_iter<T,is_last_>,Distance>
|
||||||
|
{
|
||||||
|
typedef aux::sel_iter<
|
||||||
|
T
|
||||||
|
, ( is_last_ + BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Distance) )
|
||||||
|
> type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, BOOST_MPL_AUX_NTTP_DECL(int, l1)
|
||||||
|
, BOOST_MPL_AUX_NTTP_DECL(int, l2)
|
||||||
|
>
|
||||||
|
struct distance< aux::sel_iter<T,l1>, aux::sel_iter<T,l2> >
|
||||||
|
: int_<( l2 - l1 )>
|
||||||
{
|
{
|
||||||
typedef single_element_iter<T,0> prior;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct single_iter_impl
|
namespace aux {
|
||||||
{
|
|
||||||
template< typename T > struct result_;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
struct sel_iter_tag;
|
||||||
struct single_iter_impl<0>
|
|
||||||
|
template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, is_last_) >
|
||||||
|
struct sel_iter
|
||||||
{
|
{
|
||||||
template< typename T > struct result_
|
enum { pos_ = is_last_ };
|
||||||
: single_iter_base<T,0>
|
typedef aux::sel_iter_tag tag;
|
||||||
{
|
typedef random_access_iterator_tag category;
|
||||||
typedef single_element_iter<T,1> next;
|
|
||||||
|
typedef sel_iter<T,(is_last_ + 1)> next;
|
||||||
|
typedef sel_iter<T,(is_last_ - 1)> prior;
|
||||||
typedef T type;
|
typedef T type;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
} // namespace aux
|
||||||
struct single_iter_impl<1>
|
|
||||||
|
template<> struct advance_impl<aux::sel_iter_tag>
|
||||||
{
|
{
|
||||||
template< typename T > struct result_
|
template< typename Iterator, typename N > struct apply
|
||||||
: single_iter_base<T,1>
|
|
||||||
{
|
{
|
||||||
typedef single_element_iter<T,0> prior;
|
enum { pos_ = Iterator::pos_, n_ = N::value };
|
||||||
|
typedef aux::sel_iter<
|
||||||
|
typename Iterator::type
|
||||||
|
, (pos_ + n_)
|
||||||
|
> type;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, N) >
|
template<> struct distance_impl<aux::sel_iter_tag>
|
||||||
struct single_element_iter
|
|
||||||
: single_iter_impl<N>::template result_<T>
|
|
||||||
{
|
{
|
||||||
|
template< typename Iter1, typename Iter2 > struct apply
|
||||||
|
{
|
||||||
|
enum { pos1_ = Iter1::pos_, pos2_ = Iter2::pos_ };
|
||||||
|
typedef int_<( pos2_ - pos1_ )> type;
|
||||||
|
BOOST_STATIC_CONSTANT(int, value = ( pos2_ - pos1_ ));
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
} // namespace aux
|
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#endif // BOOST_MPL_AUX_SINGLE_ELEMENT_ITER_HPP_INCLUDED
|
#endif // BOOST_MPL_AUX_SINGLE_ELEMENT_ITER_HPP_INCLUDED
|
||||||
|
@@ -14,91 +14,108 @@
|
|||||||
// $Date$
|
// $Date$
|
||||||
// $Revision$
|
// $Revision$
|
||||||
|
|
||||||
#include <boost/mpl/apply.hpp>
|
|
||||||
#include <boost/mpl/eval_if.hpp>
|
|
||||||
#include <boost/mpl/reverse_fold.hpp>
|
|
||||||
#include <boost/mpl/empty.hpp>
|
|
||||||
#include <boost/mpl/front.hpp>
|
|
||||||
#include <boost/mpl/identity.hpp>
|
|
||||||
#include <boost/mpl/partition.hpp>
|
#include <boost/mpl/partition.hpp>
|
||||||
#include <boost/mpl/pop_front.hpp>
|
#include <boost/mpl/copy.hpp>
|
||||||
#include <boost/mpl/push_front.hpp>
|
#include <boost/mpl/vector.hpp>
|
||||||
#include <boost/mpl/protect.hpp>
|
#include <boost/mpl/back_inserter.hpp>
|
||||||
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
|
#include <boost/mpl/front_inserter.hpp>
|
||||||
|
#include <boost/mpl/iterator_range.hpp>
|
||||||
|
#include <boost/mpl/joint_view.hpp>
|
||||||
|
#include <boost/mpl/single_view.hpp>
|
||||||
|
#include <boost/mpl/begin_end.hpp>
|
||||||
|
#include <boost/mpl/empty.hpp>
|
||||||
|
#include <boost/mpl/deref.hpp>
|
||||||
|
#include <boost/mpl/eval_if.hpp>
|
||||||
|
#include <boost/mpl/apply.hpp>
|
||||||
|
#include <boost/mpl/identity.hpp>
|
||||||
|
#include <boost/mpl/less.hpp>
|
||||||
|
#include <boost/mpl/aux_/na.hpp>
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl { namespace aux {
|
||||||
|
|
||||||
namespace aux {
|
template< typename Seq, typename Pred >
|
||||||
|
struct quick_sort;
|
||||||
|
|
||||||
template < typename Sequence, typename Predicate > struct quick_sort;
|
// agurt, 10/nov/04: for the sake of deficeint compilers
|
||||||
|
template< typename Pred, typename Pivot >
|
||||||
template <typename Predicate, typename Pivot>
|
|
||||||
struct quick_sort_pred
|
struct quick_sort_pred
|
||||||
{
|
{
|
||||||
template <typename T>
|
template< typename T > struct apply
|
||||||
struct apply
|
|
||||||
{
|
{
|
||||||
typedef typename apply2< Predicate, T, Pivot >::type
|
typedef typename apply2<Pred,T,Pivot>::type type;
|
||||||
type;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Sequence, typename Predicate>
|
template<
|
||||||
|
typename Seq
|
||||||
|
, typename Pred
|
||||||
|
>
|
||||||
struct quick_sort_impl
|
struct quick_sort_impl
|
||||||
{
|
{
|
||||||
private:
|
typedef typename begin<Seq>::type pivot;
|
||||||
|
|
||||||
typedef typename front<Sequence>::type pivot_;
|
|
||||||
typedef typename pop_front<Sequence>::type seq_;
|
|
||||||
|
|
||||||
typedef typename partition<
|
typedef typename partition<
|
||||||
seq_
|
iterator_range<
|
||||||
, protect< quick_sort_pred<Predicate,pivot_> >
|
typename next<pivot>::type
|
||||||
|
, typename end<Seq>::type
|
||||||
|
>
|
||||||
|
, protect< aux::quick_sort_pred< Pred, typename deref<pivot>::type > >
|
||||||
|
, back_inserter< vector<> >
|
||||||
|
, back_inserter< vector<> >
|
||||||
>::type partitioned;
|
>::type partitioned;
|
||||||
|
|
||||||
typedef typename quick_sort<
|
typedef typename quick_sort< typename partitioned::first, Pred >::type part1;
|
||||||
typename first<partitioned>::type, Predicate
|
typedef typename quick_sort< typename partitioned::second, Pred >::type part2;
|
||||||
>::type first_part;
|
|
||||||
typedef typename quick_sort<
|
|
||||||
typename second<partitioned>::type, Predicate
|
|
||||||
>::type second_part;
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
typedef typename reverse_fold<
|
|
||||||
first_part
|
|
||||||
, typename push_front< second_part,pivot_ >::type
|
|
||||||
, push_front<_,_>
|
|
||||||
>::type type;
|
|
||||||
|
|
||||||
|
typedef joint_view<
|
||||||
|
joint_view< part1, single_view< typename deref<pivot>::type > >
|
||||||
|
, part2
|
||||||
|
> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Sequence, typename Predicate>
|
template<
|
||||||
|
typename Seq
|
||||||
|
, typename Pred
|
||||||
|
>
|
||||||
struct quick_sort
|
struct quick_sort
|
||||||
: eval_if<
|
: eval_if<
|
||||||
empty<Sequence>
|
empty<Seq>
|
||||||
, identity< Sequence >
|
, identity<Seq>
|
||||||
, quick_sort_impl< Sequence,Predicate >
|
, quick_sort_impl<Seq,Pred>
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace aux
|
|
||||||
|
|
||||||
template< typename Tag >
|
template <
|
||||||
|
typename Sequence
|
||||||
|
, typename Pred
|
||||||
|
, typename In
|
||||||
|
>
|
||||||
struct sort_impl
|
struct sort_impl
|
||||||
{
|
{
|
||||||
template< typename Sequence, typename Predicate >
|
typedef typename quick_sort<
|
||||||
struct apply
|
Sequence
|
||||||
{
|
, typename if_na<Pred,less<> >::type
|
||||||
typedef typename aux::quick_sort<
|
>::type result_;
|
||||||
Sequence, Predicate
|
|
||||||
>::type type;
|
typedef typename copy<result_,In>::type type;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,sort_impl)
|
template <
|
||||||
|
typename Sequence
|
||||||
|
, typename Pred
|
||||||
|
, typename In
|
||||||
|
>
|
||||||
|
struct reverse_sort_impl
|
||||||
|
{
|
||||||
|
typedef typename quick_sort<
|
||||||
|
Sequence
|
||||||
|
, typename if_na<Pred,less<> >::type
|
||||||
|
>::type result_;
|
||||||
|
|
||||||
}}
|
typedef typename reverse_copy<result_,In>::type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
}}}
|
||||||
|
|
||||||
#endif // BOOST_MPL_AUX_SORT_IMPL_HPP_INCLUDED
|
#endif // BOOST_MPL_AUX_SORT_IMPL_HPP_INCLUDED
|
||||||
|
58
include/boost/mpl/deque.hpp
Normal file
58
include/boost/mpl/deque.hpp
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
|
||||||
|
#ifndef BOOST_MPL_DEQUE_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_DEQUE_HPP_INCLUDED
|
||||||
|
|
||||||
|
// Copyright Aleksey Gurtovoy 2000-2004
|
||||||
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// See http://www.boost.org/libs/mpl for documentation.
|
||||||
|
|
||||||
|
// $Source$
|
||||||
|
// $Date$
|
||||||
|
// $Revision$
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include <boost/mpl/limits/vector.hpp>
|
||||||
|
# include <boost/mpl/aux_/na.hpp>
|
||||||
|
# include <boost/mpl/aux_/config/preprocessor.hpp>
|
||||||
|
|
||||||
|
# include <boost/preprocessor/inc.hpp>
|
||||||
|
# include <boost/preprocessor/cat.hpp>
|
||||||
|
# include <boost/preprocessor/stringize.hpp>
|
||||||
|
|
||||||
|
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
|
||||||
|
# define AUX778076_DEQUE_HEADER \
|
||||||
|
BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE).hpp \
|
||||||
|
/**/
|
||||||
|
#else
|
||||||
|
# define AUX778076_DEQUE_HEADER \
|
||||||
|
BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE)##.hpp \
|
||||||
|
/**/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
# include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_DEQUE_HEADER)
|
||||||
|
# undef AUX778076_DEQUE_HEADER
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||||
|
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER deque.hpp
|
||||||
|
# include <boost/mpl/aux_/include_preprocessed.hpp>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include <boost/mpl/limits/vector.hpp>
|
||||||
|
|
||||||
|
# define AUX778076_SEQUENCE_NAME deque
|
||||||
|
# define AUX778076_SEQUENCE_BASE_NAME vector
|
||||||
|
# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_VECTOR_SIZE
|
||||||
|
# include <boost/mpl/aux_/sequence_wrapper.hpp>
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||||
|
#endif // BOOST_MPL_DEQUE_HPP_INCLUDED
|
@@ -20,7 +20,7 @@ namespace boost { namespace mpl {
|
|||||||
|
|
||||||
BOOST_MPL_AUX_COMMON_NAME_WKND(distance)
|
BOOST_MPL_AUX_COMMON_NAME_WKND(distance)
|
||||||
|
|
||||||
template< typename Tag > struct advance_impl;
|
template< typename Tag > struct distance_impl;
|
||||||
template< typename First, typename Last > struct distance;
|
template< typename First, typename Last > struct distance;
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
42
include/boost/mpl/empty_sequence.hpp
Normal file
42
include/boost/mpl/empty_sequence.hpp
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
|
||||||
|
#ifndef BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED
|
||||||
|
|
||||||
|
// Copyright Aleksey Gurtovoy 2004
|
||||||
|
// Copyright Alexander Nasonov 2004
|
||||||
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// See http://www.boost.org/libs/mpl for documentation.
|
||||||
|
|
||||||
|
// $Source$
|
||||||
|
// $Date$
|
||||||
|
// $Revision$
|
||||||
|
|
||||||
|
#include <boost/mpl/size_fwd.hpp>
|
||||||
|
#include <boost/mpl/int.hpp>
|
||||||
|
#include <boost/mpl/iterator_tags.hpp>
|
||||||
|
|
||||||
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
|
struct empty_sequence
|
||||||
|
{
|
||||||
|
struct tag;
|
||||||
|
struct begin { typedef random_access_iterator_tag category; };
|
||||||
|
typedef begin end;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct size_impl<empty_sequence::tag>
|
||||||
|
{
|
||||||
|
template< typename Sequence > struct apply
|
||||||
|
: int_<0>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
#endif // #ifndef BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED
|
@@ -25,14 +25,14 @@ namespace boost { namespace mpl {
|
|||||||
|
|
||||||
template<
|
template<
|
||||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
||||||
, typename BOOST_MPL_AUX_NA_PARAM(First_or_T)
|
, typename BOOST_MPL_AUX_NA_PARAM(First)
|
||||||
, typename BOOST_MPL_AUX_NA_PARAM(Last)
|
, typename BOOST_MPL_AUX_NA_PARAM(Last)
|
||||||
>
|
>
|
||||||
struct erase
|
struct erase
|
||||||
: erase_impl< typename sequence_tag<Sequence>::type >
|
: erase_impl< typename sequence_tag<Sequence>::type >
|
||||||
::template apply< Sequence,First_or_T,Last >
|
::template apply< Sequence,First,Last >
|
||||||
{
|
{
|
||||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,erase,(Sequence,First_or_T,Last))
|
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,erase,(Sequence,First,Last))
|
||||||
};
|
};
|
||||||
|
|
||||||
BOOST_MPL_AUX_NA_SPEC(3,erase)
|
BOOST_MPL_AUX_NA_SPEC(3,erase)
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#include <boost/mpl/aux_/na_spec.hpp>
|
#include <boost/mpl/aux_/na_spec.hpp>
|
||||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||||
|
#include <boost/mpl/aux_/config/gcc.hpp>
|
||||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
@@ -28,13 +29,16 @@ template<
|
|||||||
, typename BOOST_MPL_AUX_NA_PARAM(F2)
|
, typename BOOST_MPL_AUX_NA_PARAM(F2)
|
||||||
>
|
>
|
||||||
struct eval_if
|
struct eval_if
|
||||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
||||||
: if_<C,F1,F2>::type
|
|| ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \
|
||||||
{
|
&& BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \
|
||||||
#else
|
)
|
||||||
{
|
{
|
||||||
typedef typename if_<C,F1,F2>::type f_;
|
typedef typename if_<C,F1,F2>::type f_;
|
||||||
typedef typename f_::type type;
|
typedef typename f_::type type;
|
||||||
|
#else
|
||||||
|
: if_<C,F1,F2>::type
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2))
|
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2))
|
||||||
};
|
};
|
||||||
@@ -47,13 +51,16 @@ template<
|
|||||||
, typename F2
|
, typename F2
|
||||||
>
|
>
|
||||||
struct eval_if_c
|
struct eval_if_c
|
||||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
||||||
: if_c<C,F1,F2>::type
|
|| ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \
|
||||||
{
|
&& BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \
|
||||||
#else
|
)
|
||||||
{
|
{
|
||||||
typedef typename if_c<C,F1,F2>::type f_;
|
typedef typename if_c<C,F1,F2>::type f_;
|
||||||
typedef typename f_::type type;
|
typedef typename f_::type type;
|
||||||
|
#else
|
||||||
|
: if_c<C,F1,F2>::type
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
struct forward_iterator_tag : int_<0> {};
|
struct forward_iterator_tag : int_<0> { typedef forward_iterator_tag type; };
|
||||||
struct bidirectional_iterator_tag : int_<1> {};
|
struct bidirectional_iterator_tag : int_<1> { typedef bidirectional_iterator_tag type; };
|
||||||
struct random_access_iterator_tag : int_<2> {};
|
struct random_access_iterator_tag : int_<2> { typedef random_access_iterator_tag type; };
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@@ -24,17 +24,17 @@
|
|||||||
# include <boost/preprocessor/stringize.hpp>
|
# include <boost/preprocessor/stringize.hpp>
|
||||||
|
|
||||||
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
|
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
|
||||||
# define AUX778076_HEADER \
|
# define AUX778076_LIST_HEADER \
|
||||||
BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE).hpp \
|
BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE).hpp \
|
||||||
/**/
|
/**/
|
||||||
#else
|
#else
|
||||||
# define AUX778076_HEADER \
|
# define AUX778076_LIST_HEADER \
|
||||||
BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE)##.hpp \
|
BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE)##.hpp \
|
||||||
/**/
|
/**/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER)
|
# include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_LIST_HEADER)
|
||||||
# undef AUX778076_HEADER
|
# undef AUX778076_LIST_HEADER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||||
|
@@ -16,12 +16,12 @@
|
|||||||
#include <boost/preprocessor/cat.hpp>
|
#include <boost/preprocessor/cat.hpp>
|
||||||
#include <boost/preprocessor/stringize.hpp>
|
#include <boost/preprocessor/stringize.hpp>
|
||||||
|
|
||||||
# define AUX_PREPROCESSED_HEADER \
|
# define AUX778076_HEADER \
|
||||||
aux_/preprocessed/plain/BOOST_MPL_PREPROCESSED_HEADER \
|
aux_/preprocessed/plain/BOOST_MPL_PREPROCESSED_HEADER \
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
# include BOOST_PP_STRINGIZE(boost/mpl/list/AUX_PREPROCESSED_HEADER)
|
# include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER)
|
||||||
|
|
||||||
# undef AUX_PREPROCESSED_HEADER
|
# undef AUX778076_HEADER
|
||||||
|
|
||||||
#undef BOOST_MPL_PREPROCESSED_HEADER
|
#undef BOOST_MPL_PREPROCESSED_HEADER
|
||||||
|
@@ -36,6 +36,7 @@ struct list1_c
|
|||||||
>
|
>
|
||||||
{
|
{
|
||||||
typedef list1_c type;
|
typedef list1_c type;
|
||||||
|
typedef T value_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -58,6 +59,7 @@ struct BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c)
|
|||||||
>
|
>
|
||||||
{
|
{
|
||||||
typedef BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) type;
|
typedef BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) type;
|
||||||
|
typedef T value_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
# undef MPL_AUX_LIST_C_TAIL
|
# undef MPL_AUX_LIST_C_TAIL
|
||||||
|
@@ -24,17 +24,17 @@
|
|||||||
# include <boost/preprocessor/stringize.hpp>
|
# include <boost/preprocessor/stringize.hpp>
|
||||||
|
|
||||||
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
|
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
|
||||||
# define AUX778076_HEADER \
|
# define AUX778076_LIST_C_HEADER \
|
||||||
BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE),_c).hpp \
|
BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE),_c).hpp \
|
||||||
/**/
|
/**/
|
||||||
#else
|
#else
|
||||||
# define AUX778076_HEADER \
|
# define AUX778076_LIST_C_HEADER \
|
||||||
BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE),_c)##.hpp \
|
BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE),_c)##.hpp \
|
||||||
/**/
|
/**/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER)
|
# include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_LIST_C_HEADER)
|
||||||
# undef AUX778076_HEADER
|
# undef AUX778076_LIST_C_HEADER
|
||||||
# include <climits>
|
# include <climits>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
19
include/boost/mpl/max.hpp
Normal file
19
include/boost/mpl/max.hpp
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
#ifndef BOOST_MPL_MAX_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_MAX_HPP_INCLUDED
|
||||||
|
|
||||||
|
// Copyright Aleksey Gurtovoy 2004
|
||||||
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// See http://www.boost.org/libs/mpl for documentation.
|
||||||
|
|
||||||
|
// $Source$
|
||||||
|
// $Date$
|
||||||
|
// $Revision$
|
||||||
|
|
||||||
|
#include <boost/mpl/min_max.hpp>
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_MAX_HPP_INCLUDED
|
19
include/boost/mpl/min.hpp
Normal file
19
include/boost/mpl/min.hpp
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
#ifndef BOOST_MPL_MIN_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_MIN_HPP_INCLUDED
|
||||||
|
|
||||||
|
// Copyright Aleksey Gurtovoy 2004
|
||||||
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// See http://www.boost.org/libs/mpl for documentation.
|
||||||
|
|
||||||
|
// $Source$
|
||||||
|
// $Date$
|
||||||
|
// $Revision$
|
||||||
|
|
||||||
|
#include <boost/mpl/min_max.hpp>
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_MIN_HPP_INCLUDED
|
@@ -14,7 +14,6 @@
|
|||||||
// $Date$
|
// $Date$
|
||||||
// $Revision$
|
// $Revision$
|
||||||
|
|
||||||
#include <boost/mpl/apply_wrap.hpp>
|
|
||||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||||
|
|
||||||
@@ -37,45 +36,6 @@ template< typename SourceTag, typename TargetTag > struct BOOST_MPL_AUX_NUMERIC_
|
|||||||
template< typename N > struct apply;
|
template< typename N > struct apply;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
namespace aux {
|
|
||||||
|
|
||||||
template<
|
|
||||||
typename F
|
|
||||||
, typename Tag1
|
|
||||||
, typename Tag2
|
|
||||||
>
|
|
||||||
struct cast1st_impl
|
|
||||||
{
|
|
||||||
template< typename N1, typename N2 > struct apply
|
|
||||||
: apply_wrap2<
|
|
||||||
F
|
|
||||||
, typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST<Tag1,Tag2>,N1 >::type
|
|
||||||
, N2
|
|
||||||
>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
template<
|
|
||||||
typename F
|
|
||||||
, typename Tag1
|
|
||||||
, typename Tag2
|
|
||||||
>
|
|
||||||
struct cast2nd_impl
|
|
||||||
{
|
|
||||||
template< typename N1, typename N2 > struct apply
|
|
||||||
: apply_wrap2<
|
|
||||||
F
|
|
||||||
, N1
|
|
||||||
, typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST<Tag2,Tag1>,N2 >::type
|
|
||||||
>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace aux
|
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#endif // BOOST_MPL_NUMERIC_CAST_HPP_INCLUDED
|
#endif // BOOST_MPL_NUMERIC_CAST_HPP_INCLUDED
|
||||||
|
@@ -24,132 +24,120 @@
|
|||||||
#include <boost/mpl/min_max.hpp>
|
#include <boost/mpl/min_max.hpp>
|
||||||
#include <boost/mpl/pair.hpp>
|
#include <boost/mpl/pair.hpp>
|
||||||
#include <boost/mpl/iterator_tags.hpp>
|
#include <boost/mpl/iterator_tags.hpp>
|
||||||
#include <boost/mpl/lambda.hpp>
|
|
||||||
#include <boost/mpl/aux_/msvc_eti_base.hpp>
|
|
||||||
#include <boost/mpl/aux_/iterator_names.hpp>
|
|
||||||
#include <boost/mpl/aux_/config/ctps.hpp>
|
#include <boost/mpl/aux_/config/ctps.hpp>
|
||||||
#include <boost/mpl/aux_/na_spec.hpp>
|
#include <boost/mpl/aux_/na_spec.hpp>
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
struct pair_iter_tag;
|
||||||
|
|
||||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
|
|
||||||
template< typename I1, typename I2, typename Category >
|
template< typename Iter1, typename Iter2, typename Category >
|
||||||
struct pair_iter;
|
struct pair_iter;
|
||||||
|
|
||||||
template< typename Category >
|
template< typename Category > struct prior_pair_iter
|
||||||
struct pair_iter_ops
|
|
||||||
{
|
{
|
||||||
template< typename I1, typename I2 > struct result_
|
template< typename Iter1, typename Iter2 > struct apply
|
||||||
{
|
{
|
||||||
typedef typename mpl::next<I1>::type i1_;
|
typedef typename mpl::prior<Iter1>::type i1_;
|
||||||
typedef typename mpl::next<I2>::type i2_;
|
typedef typename mpl::prior<Iter2>::type i2_;
|
||||||
typedef pair_iter<i1_,i2_,Category> next;
|
typedef pair_iter<i1_,i2_,Category> type;
|
||||||
typedef pair< typename deref<I1>::type, typename deref<I2>::type > type;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<> struct prior_pair_iter<forward_iterator_tag>
|
||||||
struct pair_iter_ops<bidirectional_iterator_tag>
|
|
||||||
{
|
{
|
||||||
template< typename I1, typename I2 > struct result_
|
template< typename Iter1, typename Iter2 > struct apply
|
||||||
{
|
{
|
||||||
typedef bidirectional_iterator_tag category;
|
typedef pair_iter<Iter1,Iter2,forward_iterator_tag> type;
|
||||||
|
|
||||||
typedef typename mpl::next<I1>::type i1_;
|
|
||||||
typedef typename mpl::next<I2>::type i2_;
|
|
||||||
typedef pair_iter<i1_,i2_,category> next;
|
|
||||||
|
|
||||||
typedef typename mpl::prior<I1>::type k1_;
|
|
||||||
typedef typename mpl::prior<I2>::type k2_;
|
|
||||||
typedef pair_iter<k1_,k2_,category> prior;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
|
||||||
struct pair_iter_ops<random_access_iterator_tag>
|
|
||||||
{
|
|
||||||
template< typename I1, typename I2 > struct result_
|
|
||||||
{
|
|
||||||
typedef random_access_iterator_tag category;
|
|
||||||
|
|
||||||
typedef typename mpl::next<I1>::type i1_;
|
|
||||||
typedef typename mpl::next<I2>::type i2_;
|
|
||||||
typedef pair_iter<i1_,i2_,category> next;
|
|
||||||
|
|
||||||
typedef typename mpl::prior<I1>::type k1_;
|
|
||||||
typedef typename mpl::prior<I2>::type k2_;
|
|
||||||
typedef pair_iter<k1_,k2_,category> prior;
|
|
||||||
|
|
||||||
template< typename Distance > struct BOOST_MPL_AUX_ITERATOR_ADVANCE
|
|
||||||
{
|
|
||||||
typedef typename advance<I1,Distance>::type iter1_;
|
|
||||||
typedef typename advance<I2,Distance>::type iter2_;
|
|
||||||
typedef pair_iter<iter1_,iter2_,category> type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template< typename U > struct BOOST_MPL_AUX_ITERATOR_DISTANCE
|
|
||||||
: distance<typename U::first,I1>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
|
||||||
|
|
||||||
|
|
||||||
template< typename I1, typename I2, typename Category >
|
|
||||||
struct pair_iter
|
|
||||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
|
||||||
: aux::msvc_eti_base< pair_iter_ops<Category>
|
|
||||||
::template result_<I1,I2> >::type
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename Iter1
|
||||||
|
, typename Iter2
|
||||||
|
, typename Category
|
||||||
|
>
|
||||||
|
struct pair_iter
|
||||||
{
|
{
|
||||||
|
typedef aux::pair_iter_tag tag;
|
||||||
typedef Category category;
|
typedef Category category;
|
||||||
|
typedef Iter1 first;
|
||||||
|
typedef Iter2 second;
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
|
typedef pair<
|
||||||
|
typename deref<Iter1>::type
|
||||||
|
, typename deref<Iter2>::type
|
||||||
|
> type;
|
||||||
|
|
||||||
|
typedef typename mpl::next<Iter1>::type i1_;
|
||||||
|
typedef typename mpl::next<Iter2>::type i2_;
|
||||||
|
typedef pair_iter<i1_,i2_,Category> next;
|
||||||
|
|
||||||
|
typedef apply_wrap2< aux::prior_pair_iter<Category>,Iter1,Iter2 >::type prior;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
|
|
||||||
template< typename I1, typename I2, typename C >
|
template< typename Iter1, typename Iter2, typename C >
|
||||||
struct deref< pair_iter<I1,I2,C> >
|
struct deref< pair_iter<Iter1,Iter2,C> >
|
||||||
{
|
{
|
||||||
typedef pair< typename deref<I1>::type, typename deref<I2>::type > type;
|
typedef pair<
|
||||||
|
typename deref<Iter1>::type
|
||||||
|
, typename deref<Iter2>::type
|
||||||
|
> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template< typename I1, typename I2, typename C >
|
template< typename Iter1, typename Iter2, typename C >
|
||||||
struct next< pair_iter<I1,I2,C> >
|
struct next< pair_iter<Iter1,Iter2,C> >
|
||||||
{
|
{
|
||||||
typedef typename mpl::next<I1>::type i1_;
|
typedef typename mpl::next<Iter1>::type i1_;
|
||||||
typedef typename mpl::next<I2>::type i2_;
|
typedef typename mpl::next<Iter2>::type i2_;
|
||||||
typedef pair_iter<i1_,i2_,C> type;
|
typedef pair_iter<i1_,i2_,C> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template< typename I1, typename I2, typename C >
|
template< typename Iter1, typename Iter2, typename C >
|
||||||
struct prior< pair_iter<I1,I2,C> >
|
struct prior< pair_iter<Iter1,Iter2,C> >
|
||||||
{
|
{
|
||||||
typedef typename mpl::prior<I1>::type i1_;
|
typedef typename mpl::prior<Iter1>::type i1_;
|
||||||
typedef typename mpl::prior<I2>::type i2_;
|
typedef typename mpl::prior<Iter2>::type i2_;
|
||||||
typedef pair_iter<i1_,i2_,C> type;
|
typedef pair_iter<i1_,i2_,C> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template< typename I1, typename I2, typename C, typename Distance >
|
|
||||||
struct advance< pair_iter<I1,I2,C>,Distance>
|
|
||||||
{
|
|
||||||
typedef typename mpl::advance<I1,Distance>::type iter1_;
|
|
||||||
typedef typename mpl::advance<I2,Distance>::type iter2_;
|
|
||||||
typedef pair_iter<iter1_,iter2_,C> type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template< typename I1, typename I2, typename K1, typename K2, typename C >
|
|
||||||
struct distance< pair_iter<I1,I2,C>, pair_iter<K1,K2,C> >
|
|
||||||
: mpl::distance<K1,I1>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
|
|
||||||
|
template<> struct advance_impl<aux::pair_iter_tag>
|
||||||
|
{
|
||||||
|
template< typename Iter, typename D > struct apply
|
||||||
|
{
|
||||||
|
typedef typename mpl::advance< typename Iter::first,D >::type i1_;
|
||||||
|
typedef typename mpl::advance< typename Iter::second,D >::type i2_;
|
||||||
|
typedef pair_iter<i1_,i2_,typename Iter::category> type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct distance_impl<aux::pair_iter_tag>
|
||||||
|
{
|
||||||
|
template< typename Iter1, typename Iter2 > struct apply
|
||||||
|
{
|
||||||
|
// agurt, 10/nov/04: MSVC 6.5 ICE-s on forwarding
|
||||||
|
typedef typename mpl::distance<
|
||||||
|
typename first<Iter1>::type
|
||||||
|
, typename first<Iter2>::type
|
||||||
|
>::type type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence1)
|
typename BOOST_MPL_AUX_NA_PARAM(Sequence1)
|
||||||
, typename BOOST_MPL_AUX_NA_PARAM(Sequence2)
|
, typename BOOST_MPL_AUX_NA_PARAM(Sequence2)
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
#define BOOST_MPL_PARTITION_HPP_INCLUDED
|
#define BOOST_MPL_PARTITION_HPP_INCLUDED
|
||||||
|
|
||||||
// Copyright Eric Friedman 2002-2003
|
// Copyright Eric Friedman 2002-2003
|
||||||
|
// Copyright Aleksey Gurtovoy 2004
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@@ -14,32 +15,38 @@
|
|||||||
// $Date$
|
// $Date$
|
||||||
// $Revision$
|
// $Revision$
|
||||||
|
|
||||||
#include <boost/mpl/aux_/partition_op.hpp>
|
#include <boost/mpl/stable_partition.hpp>
|
||||||
#include <boost/mpl/clear.hpp>
|
#include <boost/mpl/aux_/inserter_algorithm.hpp>
|
||||||
#include <boost/mpl/iter_fold.hpp>
|
|
||||||
#include <boost/mpl/pair.hpp>
|
|
||||||
#include <boost/mpl/aux_/na_spec.hpp>
|
|
||||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
template <
|
namespace aux {
|
||||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
|
||||||
, typename BOOST_MPL_AUX_NA_PARAM(Predicate)
|
|
||||||
>
|
|
||||||
struct partition
|
|
||||||
{
|
|
||||||
typedef typename clear<Sequence>::type cleared_;
|
|
||||||
typedef typename iter_fold<
|
|
||||||
Sequence
|
|
||||||
, pair< cleared_,cleared_ >
|
|
||||||
, aux::partition_op<Predicate>
|
|
||||||
>::type type;
|
|
||||||
|
|
||||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,partition,(Sequence,Predicate))
|
template <
|
||||||
|
typename Sequence
|
||||||
|
, typename Pred
|
||||||
|
, typename In1
|
||||||
|
, typename In2
|
||||||
|
>
|
||||||
|
struct partition_impl
|
||||||
|
: stable_partition_impl<Sequence,Pred,In1,In2>
|
||||||
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
BOOST_MPL_AUX_NA_SPEC(2, partition)
|
template <
|
||||||
|
typename Sequence
|
||||||
|
, typename Pred
|
||||||
|
, typename In1
|
||||||
|
, typename In2
|
||||||
|
>
|
||||||
|
struct reverse_partition_impl
|
||||||
|
: reverse_stable_partition_impl<Sequence,Pred,In1,In2>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, partition)
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
#ifndef BOOST_MPL_RANGE_C_HPP_INCLUDED
|
#ifndef BOOST_MPL_RANGE_C_HPP_INCLUDED
|
||||||
#define BOOST_MPL_RANGE_C_HPP_INCLUDED
|
#define BOOST_MPL_RANGE_C_HPP_INCLUDED
|
||||||
|
|
||||||
// Copyright Aleksey Gurtovoy 2000-2002
|
// Copyright Aleksey Gurtovoy 2000-2004
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@@ -14,7 +14,6 @@
|
|||||||
// $Date$
|
// $Date$
|
||||||
// $Revision$
|
// $Revision$
|
||||||
|
|
||||||
|
|
||||||
#include <boost/mpl/integral_c.hpp>
|
#include <boost/mpl/integral_c.hpp>
|
||||||
#include <boost/mpl/aux_/range_c/front.hpp>
|
#include <boost/mpl/aux_/range_c/front.hpp>
|
||||||
#include <boost/mpl/aux_/range_c/back.hpp>
|
#include <boost/mpl/aux_/range_c/back.hpp>
|
||||||
@@ -34,13 +33,14 @@ template<
|
|||||||
struct range_c
|
struct range_c
|
||||||
{
|
{
|
||||||
typedef aux::half_open_range_tag tag;
|
typedef aux::half_open_range_tag tag;
|
||||||
|
typedef T value_type;
|
||||||
typedef range_c type;
|
typedef range_c type;
|
||||||
|
|
||||||
typedef integral_c<T,Start> start;
|
typedef integral_c<T,Start> start;
|
||||||
typedef integral_c<T,Finish> finish;
|
typedef integral_c<T,Finish> finish;
|
||||||
|
|
||||||
typedef rc_iter<start> begin;
|
typedef r_iter<start> begin;
|
||||||
typedef rc_iter<finish> end;
|
typedef r_iter<finish> end;
|
||||||
};
|
};
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
@@ -18,24 +18,37 @@
|
|||||||
|
|
||||||
#include <boost/mpl/replace_if.hpp>
|
#include <boost/mpl/replace_if.hpp>
|
||||||
#include <boost/mpl/same_as.hpp>
|
#include <boost/mpl/same_as.hpp>
|
||||||
#include <boost/mpl/aux_/common_name_wknd.hpp>
|
#include <boost/mpl/aux_/inserter_algorithm.hpp>
|
||||||
#include <boost/mpl/aux_/na_spec.hpp>
|
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
BOOST_MPL_AUX_COMMON_NAME_WKND(replace)
|
namespace aux {
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
typename Sequence
|
||||||
, typename BOOST_MPL_AUX_NA_PARAM(OldType)
|
, typename OldType
|
||||||
, typename BOOST_MPL_AUX_NA_PARAM(NewType)
|
, typename NewType
|
||||||
|
, typename Inserter
|
||||||
>
|
>
|
||||||
struct replace
|
struct replace_impl
|
||||||
: replace_if< Sequence, same_as<OldType>, NewType >
|
: replace_if_impl< Sequence, same_as<OldType>, NewType, Inserter >
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
BOOST_MPL_AUX_NA_SPEC(3, replace)
|
template<
|
||||||
|
typename Sequence
|
||||||
|
, typename OldType
|
||||||
|
, typename NewType
|
||||||
|
, typename Inserter
|
||||||
|
>
|
||||||
|
struct reverse_replace_impl
|
||||||
|
: reverse_replace_if_impl< Sequence, same_as<OldType>, NewType, Inserter >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, replace)
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@@ -19,14 +19,11 @@
|
|||||||
#include <boost/mpl/transform.hpp>
|
#include <boost/mpl/transform.hpp>
|
||||||
#include <boost/mpl/apply.hpp>
|
#include <boost/mpl/apply.hpp>
|
||||||
#include <boost/mpl/if.hpp>
|
#include <boost/mpl/if.hpp>
|
||||||
#include <boost/mpl/aux_/common_name_wknd.hpp>
|
#include <boost/mpl/aux_/inserter_algorithm.hpp>
|
||||||
#include <boost/mpl/aux_/na_spec.hpp>
|
|
||||||
#include <boost/mpl/aux_/config/forwarding.hpp>
|
#include <boost/mpl/aux_/config/forwarding.hpp>
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
BOOST_MPL_AUX_COMMON_NAME_WKND(replace_if)
|
|
||||||
|
|
||||||
namespace aux {
|
namespace aux {
|
||||||
|
|
||||||
template< typename Predicate, typename T >
|
template< typename Predicate, typename T >
|
||||||
@@ -51,16 +48,15 @@ struct replace_if_op
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace aux
|
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
typename Sequence
|
||||||
, typename BOOST_MPL_AUX_NA_PARAM(Predicate)
|
, typename Predicate
|
||||||
, typename BOOST_MPL_AUX_NA_PARAM(T)
|
, typename T
|
||||||
, typename BOOST_MPL_AUX_NA_PARAM(Inserter)
|
, typename Inserter
|
||||||
>
|
>
|
||||||
struct replace_if
|
struct replace_if_impl
|
||||||
: transform1<
|
: transform1_impl<
|
||||||
Sequence
|
Sequence
|
||||||
, protect< aux::replace_if_op<Predicate,T> >
|
, protect< aux::replace_if_op<Predicate,T> >
|
||||||
, Inserter
|
, Inserter
|
||||||
@@ -68,7 +64,24 @@ struct replace_if
|
|||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
BOOST_MPL_AUX_NA_SPEC(3, replace_if)
|
template<
|
||||||
|
typename Sequence
|
||||||
|
, typename Predicate
|
||||||
|
, typename T
|
||||||
|
, typename Inserter
|
||||||
|
>
|
||||||
|
struct reverse_replace_if_impl
|
||||||
|
: reverse_transform1_impl<
|
||||||
|
Sequence
|
||||||
|
, protect< aux::replace_if_op<Predicate,T> >
|
||||||
|
, Inserter
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, replace_if)
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
48
include/boost/mpl/set/aux_/numbered_c.hpp
Normal file
48
include/boost/mpl/set/aux_/numbered_c.hpp
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
|
||||||
|
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
|
||||||
|
|
||||||
|
#if defined(BOOST_PP_IS_ITERATING)
|
||||||
|
|
||||||
|
// Copyright Aleksey Gurtovoy 2000-2004
|
||||||
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// See http://www.boost.org/libs/mpl for documentation.
|
||||||
|
|
||||||
|
// $Source$
|
||||||
|
// $Date$
|
||||||
|
// $Revision$
|
||||||
|
|
||||||
|
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||||
|
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
|
||||||
|
#include <boost/preprocessor/dec.hpp>
|
||||||
|
#include <boost/preprocessor/cat.hpp>
|
||||||
|
|
||||||
|
#define i_ BOOST_PP_FRAME_ITERATION(1)
|
||||||
|
|
||||||
|
# define AUX778076_SET_C_TAIL(set, i_, T, C) \
|
||||||
|
BOOST_PP_CAT(BOOST_PP_CAT(set,i_),_c)< \
|
||||||
|
T BOOST_PP_ENUM_TRAILING_PARAMS(i_, C) \
|
||||||
|
> \
|
||||||
|
/**/
|
||||||
|
|
||||||
|
template<
|
||||||
|
typename T
|
||||||
|
, BOOST_PP_ENUM_PARAMS(i_, T C)
|
||||||
|
>
|
||||||
|
struct BOOST_PP_CAT(BOOST_PP_CAT(set,i_),_c)
|
||||||
|
: s_item<
|
||||||
|
integral_c<T,BOOST_PP_CAT(C,BOOST_PP_DEC(i_))>
|
||||||
|
, AUX778076_SET_C_TAIL(set,BOOST_PP_DEC(i_), T, C)
|
||||||
|
>
|
||||||
|
{
|
||||||
|
typedef BOOST_PP_CAT(BOOST_PP_CAT(set,i_),_c) type;
|
||||||
|
};
|
||||||
|
|
||||||
|
# undef AUX778076_SET_C_TAIL
|
||||||
|
|
||||||
|
#undef i_
|
||||||
|
|
||||||
|
#endif // BOOST_PP_IS_ITERATING
|
32
include/boost/mpl/set/set0_c.hpp
Normal file
32
include/boost/mpl/set/set0_c.hpp
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
#ifndef BOOST_MPL_SET_SET0_C_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_SET_SET0_C_HPP_INCLUDED
|
||||||
|
|
||||||
|
// Copyright Aleksey Gurtovoy 2003-2004
|
||||||
|
// Copyright David Abrahams 2003-2004
|
||||||
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// See http://www.boost.org/libs/mpl for documentation.
|
||||||
|
|
||||||
|
// $Source$
|
||||||
|
// $Date$
|
||||||
|
// $Revision$
|
||||||
|
|
||||||
|
#include <boost/mpl/set/set0.hpp>
|
||||||
|
#include <boost/mpl/integral_c.hpp>
|
||||||
|
|
||||||
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
|
template< typename T > struct set0_c
|
||||||
|
: set0<>
|
||||||
|
{
|
||||||
|
typedef set0_c type;
|
||||||
|
typedef T value_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_SET_SET0_C_HPP_INCLUDED
|
45
include/boost/mpl/set/set10_c.hpp
Normal file
45
include/boost/mpl/set/set10_c.hpp
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
|
||||||
|
#ifndef BOOST_MPL_SET_SET10_C_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_SET_SET10_C_HPP_INCLUDED
|
||||||
|
|
||||||
|
// Copyright Aleksey Gurtovoy 2000-2004
|
||||||
|
// Copyright David Abrahams 2003-2004
|
||||||
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// See http://www.boost.org/libs/mpl for documentation.
|
||||||
|
|
||||||
|
// $Source$
|
||||||
|
// $Date$
|
||||||
|
// $Revision$
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include <boost/mpl/set/set0_c.hpp>
|
||||||
|
# include <boost/mpl/set/set10.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||||
|
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER set10_c.hpp
|
||||||
|
# include <boost/mpl/set/aux_/include_preprocessed.hpp>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include <boost/preprocessor/iterate.hpp>
|
||||||
|
|
||||||
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||||
|
(3,(1, 10, <boost/mpl/set/aux_/numbered_c.hpp>))
|
||||||
|
# include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_SET_SET10_C_HPP_INCLUDED
|
45
include/boost/mpl/set/set20_c.hpp
Normal file
45
include/boost/mpl/set/set20_c.hpp
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
|
||||||
|
#ifndef BOOST_MPL_SET_SET20_C_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_SET_SET20_C_HPP_INCLUDED
|
||||||
|
|
||||||
|
// Copyright Aleksey Gurtovoy 2000-2004
|
||||||
|
// Copyright David Abrahams 2003-2004
|
||||||
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// See http://www.boost.org/libs/mpl for documentation.
|
||||||
|
|
||||||
|
// $Source$
|
||||||
|
// $Date$
|
||||||
|
// $Revision$
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include <boost/mpl/set/set10_c.hpp>
|
||||||
|
# include <boost/mpl/set/set20.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||||
|
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER set20_c.hpp
|
||||||
|
# include <boost/mpl/set/aux_/include_preprocessed.hpp>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include <boost/preprocessor/iterate.hpp>
|
||||||
|
|
||||||
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||||
|
(3,(11, 20, <boost/mpl/set/aux_/numbered_c.hpp>))
|
||||||
|
# include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_SET_SET20_C_HPP_INCLUDED
|
45
include/boost/mpl/set/set30_c.hpp
Normal file
45
include/boost/mpl/set/set30_c.hpp
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
|
||||||
|
#ifndef BOOST_MPL_SET_SET30_C_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_SET_SET30_C_HPP_INCLUDED
|
||||||
|
|
||||||
|
// Copyright Aleksey Gurtovoy 2000-2004
|
||||||
|
// Copyright David Abrahams 2003-2004
|
||||||
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// See http://www.boost.org/libs/mpl for documentation.
|
||||||
|
|
||||||
|
// $Source$
|
||||||
|
// $Date$
|
||||||
|
// $Revision$
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include <boost/mpl/set/set20_c.hpp>
|
||||||
|
# include <boost/mpl/set/set30.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||||
|
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER set30_c.hpp
|
||||||
|
# include <boost/mpl/set/aux_/include_preprocessed.hpp>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include <boost/preprocessor/iterate.hpp>
|
||||||
|
|
||||||
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||||
|
(3,(21, 30, <boost/mpl/set/aux_/numbered_c.hpp>))
|
||||||
|
# include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_SET_SET30_C_HPP_INCLUDED
|
45
include/boost/mpl/set/set40_c.hpp
Normal file
45
include/boost/mpl/set/set40_c.hpp
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
|
||||||
|
#ifndef BOOST_MPL_SET_SET40_C_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_SET_SET40_C_HPP_INCLUDED
|
||||||
|
|
||||||
|
// Copyright Aleksey Gurtovoy 2000-2004
|
||||||
|
// Copyright David Abrahams 2003-2004
|
||||||
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// See http://www.boost.org/libs/mpl for documentation.
|
||||||
|
|
||||||
|
// $Source$
|
||||||
|
// $Date$
|
||||||
|
// $Revision$
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include <boost/mpl/set/set30_c.hpp>
|
||||||
|
# include <boost/mpl/set/set40.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||||
|
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER set40_c.hpp
|
||||||
|
# include <boost/mpl/set/aux_/include_preprocessed.hpp>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include <boost/preprocessor/iterate.hpp>
|
||||||
|
|
||||||
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||||
|
(3,(31, 40, <boost/mpl/set/aux_/numbered_c.hpp>))
|
||||||
|
# include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_SET_SET40_C_HPP_INCLUDED
|
45
include/boost/mpl/set/set50_c.hpp
Normal file
45
include/boost/mpl/set/set50_c.hpp
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
|
||||||
|
#ifndef BOOST_MPL_SET_SET50_C_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_SET_SET50_C_HPP_INCLUDED
|
||||||
|
|
||||||
|
// Copyright Aleksey Gurtovoy 2000-2004
|
||||||
|
// Copyright David Abrahams 2003-2004
|
||||||
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// See http://www.boost.org/libs/mpl for documentation.
|
||||||
|
|
||||||
|
// $Source$
|
||||||
|
// $Date$
|
||||||
|
// $Revision$
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include <boost/mpl/set/set40_c.hpp>
|
||||||
|
# include <boost/mpl/set/set50.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||||
|
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER set50_c.hpp
|
||||||
|
# include <boost/mpl/set/aux_/include_preprocessed.hpp>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include <boost/preprocessor/iterate.hpp>
|
||||||
|
|
||||||
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
|
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||||
|
(3,(41, 50, <boost/mpl/set/aux_/numbered_c.hpp>))
|
||||||
|
# include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_SET_SET50_C_HPP_INCLUDED
|
60
include/boost/mpl/set_c.hpp
Normal file
60
include/boost/mpl/set_c.hpp
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
|
||||||
|
#ifndef BOOST_MPL_SET_C_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_SET_C_HPP_INCLUDED
|
||||||
|
|
||||||
|
// Copyright Aleksey Gurtovoy 2000-2004
|
||||||
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// See http://www.boost.org/libs/mpl for documentation.
|
||||||
|
|
||||||
|
// $Source$
|
||||||
|
// $Date$
|
||||||
|
// $Revision$
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
# include <boost/mpl/limits/set.hpp>
|
||||||
|
# include <boost/mpl/aux_/nttp_decl.hpp>
|
||||||
|
# include <boost/mpl/aux_/config/preprocessor.hpp>
|
||||||
|
|
||||||
|
# include <boost/preprocessor/inc.hpp>
|
||||||
|
# include <boost/preprocessor/cat.hpp>
|
||||||
|
# include <boost/preprocessor/stringize.hpp>
|
||||||
|
|
||||||
|
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
|
||||||
|
# define AUX778076_SET_C_HEADER \
|
||||||
|
BOOST_PP_CAT(BOOST_PP_CAT(set,BOOST_MPL_LIMIT_SET_SIZE),_c).hpp \
|
||||||
|
/**/
|
||||||
|
#else
|
||||||
|
# define AUX778076_SET_C_HEADER \
|
||||||
|
BOOST_PP_CAT(BOOST_PP_CAT(set,BOOST_MPL_LIMIT_SET_SIZE),_c)##.hpp \
|
||||||
|
/**/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
# include BOOST_PP_STRINGIZE(boost/mpl/set/AUX778076_SET_C_HEADER)
|
||||||
|
# undef AUX778076_SET_C_HEADER
|
||||||
|
# include <climits>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||||
|
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
|
||||||
|
# define BOOST_MPL_PREPROCESSED_HEADER set_c.hpp
|
||||||
|
# include <boost/mpl/aux_/include_preprocessed.hpp>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
# include <boost/mpl/limits/set.hpp>
|
||||||
|
|
||||||
|
# define AUX778076_SEQUENCE_NAME set_c
|
||||||
|
# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_SET_SIZE
|
||||||
|
# define AUX778076_SEQUENCE_NAME_N(n) BOOST_PP_CAT(BOOST_PP_CAT(set,n),_c)
|
||||||
|
# define AUX778076_SEQUENCE_INTEGRAL_WRAPPER
|
||||||
|
# include <boost/mpl/aux_/sequence_wrapper.hpp>
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||||
|
#endif // BOOST_MPL_SET_C_HPP_INCLUDED
|
@@ -25,8 +25,8 @@ template<
|
|||||||
>
|
>
|
||||||
struct single_view
|
struct single_view
|
||||||
: iterator_range<
|
: iterator_range<
|
||||||
aux::single_element_iter<T,0>
|
aux::sel_iter<T,0>
|
||||||
, aux::single_element_iter<T,1>
|
, aux::sel_iter<T,1>
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
@@ -15,27 +15,12 @@
|
|||||||
// $Date$
|
// $Date$
|
||||||
// $Revision$
|
// $Revision$
|
||||||
|
|
||||||
#include <boost/mpl/sort_fwd.hpp>
|
|
||||||
#include <boost/mpl/less.hpp>
|
|
||||||
#include <boost/mpl/sequence_tag.hpp>
|
|
||||||
#include <boost/mpl/aux_/sort_impl.hpp>
|
#include <boost/mpl/aux_/sort_impl.hpp>
|
||||||
#include <boost/mpl/aux_/na_spec.hpp>
|
#include <boost/mpl/aux_/inserter_algorithm.hpp>
|
||||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
template <
|
BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, sort)
|
||||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
|
||||||
, typename Predicate = less<_,_>
|
|
||||||
>
|
|
||||||
struct sort
|
|
||||||
: sort_impl< typename sequence_tag<Sequence>::type >
|
|
||||||
::template apply< Sequence,Predicate >
|
|
||||||
{
|
|
||||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,sort,(Sequence,Predicate))
|
|
||||||
};
|
|
||||||
|
|
||||||
BOOST_MPL_AUX_NA_SPEC(1, sort)
|
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@@ -1,29 +0,0 @@
|
|||||||
|
|
||||||
#ifndef BOOST_MPL_SORT_FWD_HPP_INCLUDED
|
|
||||||
#define BOOST_MPL_SORT_FWD_HPP_INCLUDED
|
|
||||||
|
|
||||||
// Copyright Eric Friedman 2002-2003
|
|
||||||
// Copyright Aleksey Gurtovoy 2004
|
|
||||||
//
|
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
|
||||||
//
|
|
||||||
// See http://www.boost.org/libs/mpl for documentation.
|
|
||||||
|
|
||||||
// $Source$
|
|
||||||
// $Date$
|
|
||||||
// $Revision$
|
|
||||||
|
|
||||||
#include <boost/mpl/aux_/common_name_wknd.hpp>
|
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
|
||||||
|
|
||||||
BOOST_MPL_AUX_COMMON_NAME_WKND(sort)
|
|
||||||
|
|
||||||
template< typename Tag > struct sort_impl;
|
|
||||||
template< typename Sequence, typename Predicate > struct sort;
|
|
||||||
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif // BOOST_MPL_SORT_FWD_HPP_INCLUDED
|
|
@@ -3,6 +3,7 @@
|
|||||||
#define BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED
|
#define BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED
|
||||||
|
|
||||||
// Copyright Eric Friedman 2002-2003
|
// Copyright Eric Friedman 2002-2003
|
||||||
|
// Copyright Aleksey Gurtovoy 2004
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@@ -14,32 +15,60 @@
|
|||||||
// $Date$
|
// $Date$
|
||||||
// $Revision$
|
// $Revision$
|
||||||
|
|
||||||
|
#include <boost/mpl/fold.hpp>
|
||||||
|
#include <boost/mpl/reverse_fold.hpp>
|
||||||
|
#include <boost/mpl/protect.hpp>
|
||||||
#include <boost/mpl/aux_/partition_op.hpp>
|
#include <boost/mpl/aux_/partition_op.hpp>
|
||||||
#include <boost/mpl/clear.hpp>
|
#include <boost/mpl/aux_/inserter_algorithm.hpp>
|
||||||
#include <boost/mpl/reverse_iter_fold.hpp>
|
#include <boost/mpl/aux_/na.hpp>
|
||||||
#include <boost/mpl/pair.hpp>
|
|
||||||
#include <boost/mpl/aux_/na_spec.hpp>
|
|
||||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
template <
|
namespace aux {
|
||||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
|
||||||
, typename BOOST_MPL_AUX_NA_PARAM(Predicate)
|
|
||||||
>
|
|
||||||
struct stable_partition
|
|
||||||
{
|
|
||||||
typedef typename clear<Sequence>::type cleared_;
|
|
||||||
typedef typename reverse_iter_fold<
|
|
||||||
Sequence
|
|
||||||
, pair< cleared_,cleared_ >
|
|
||||||
, aux::partition_op<Predicate>
|
|
||||||
>::type type;
|
|
||||||
|
|
||||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,stable_partition,(Sequence,Predicate))
|
template <
|
||||||
|
typename Sequence
|
||||||
|
, typename Pred
|
||||||
|
, typename In
|
||||||
|
, typename In2
|
||||||
|
, typename In1 = typename if_na<In,In2>::type
|
||||||
|
>
|
||||||
|
struct stable_partition_impl
|
||||||
|
: fold<
|
||||||
|
Sequence
|
||||||
|
, pair< typename In1::state, typename In2::state >
|
||||||
|
, protect< partition_op<
|
||||||
|
Pred
|
||||||
|
, typename In1::operation
|
||||||
|
, typename In2::operation
|
||||||
|
> >
|
||||||
|
>
|
||||||
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
BOOST_MPL_AUX_NA_SPEC(2, stable_partition)
|
template <
|
||||||
|
typename Sequence
|
||||||
|
, typename Pred
|
||||||
|
, typename In
|
||||||
|
, typename In2
|
||||||
|
, typename In1 = typename if_na<In,In2>::type
|
||||||
|
>
|
||||||
|
struct reverse_stable_partition_impl
|
||||||
|
: reverse_fold<
|
||||||
|
Sequence
|
||||||
|
, pair< typename In1::state, typename In2::state >
|
||||||
|
, protect< partition_op<
|
||||||
|
Pred
|
||||||
|
, typename In1::operation
|
||||||
|
, typename In2::operation
|
||||||
|
> >
|
||||||
|
>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace aux
|
||||||
|
|
||||||
|
BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, stable_partition)
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@@ -24,17 +24,17 @@
|
|||||||
# include <boost/preprocessor/stringize.hpp>
|
# include <boost/preprocessor/stringize.hpp>
|
||||||
|
|
||||||
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
|
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
|
||||||
# define AUX778076_HEADER \
|
# define AUX778076_VECTOR_HEADER \
|
||||||
BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE).hpp \
|
BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE).hpp \
|
||||||
/**/
|
/**/
|
||||||
#else
|
#else
|
||||||
# define AUX778076_HEADER \
|
# define AUX778076_VECTOR_HEADER \
|
||||||
BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE)##.hpp \
|
BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE)##.hpp \
|
||||||
/**/
|
/**/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_HEADER)
|
# include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_VECTOR_HEADER)
|
||||||
# undef AUX778076_HEADER
|
# undef AUX778076_VECTOR_HEADER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||||
|
@@ -21,28 +21,28 @@
|
|||||||
#include <boost/preprocessor/stringize.hpp>
|
#include <boost/preprocessor/stringize.hpp>
|
||||||
|
|
||||||
#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
|
#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
|
||||||
# define AUX_VECTOR_INCLIDE_DIR typeof_based
|
# define AUX778076_INCLUDE_DIR typeof_based
|
||||||
#elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
#elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||||
|| defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC)
|
|| defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC)
|
||||||
# define AUX_VECTOR_INCLIDE_DIR no_ctps
|
# define AUX778076_INCLUDE_DIR no_ctps
|
||||||
#else
|
#else
|
||||||
# define AUX_VECTOR_INCLIDE_DIR plain
|
# define AUX778076_INCLUDE_DIR plain
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
|
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
|
||||||
# define AUX_PREPROCESSED_HEADER \
|
# define AUX778076_HEADER \
|
||||||
AUX_VECTOR_INCLIDE_DIR/BOOST_MPL_PREPROCESSED_HEADER \
|
AUX778076_INCLUDE_DIR/BOOST_MPL_PREPROCESSED_HEADER \
|
||||||
/**/
|
/**/
|
||||||
#else
|
#else
|
||||||
# define AUX_PREPROCESSED_HEADER \
|
# define AUX778076_HEADER \
|
||||||
BOOST_PP_CAT(AUX_VECTOR_INCLIDE_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \
|
BOOST_PP_CAT(AUX778076_INCLUDE_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \
|
||||||
/**/
|
/**/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
# include BOOST_PP_STRINGIZE(boost/mpl/vector/aux_/preprocessed/AUX_PREPROCESSED_HEADER)
|
# include BOOST_PP_STRINGIZE(boost/mpl/vector/aux_/preprocessed/AUX778076_HEADER)
|
||||||
|
|
||||||
# undef AUX_PREPROCESSED_HEADER
|
# undef AUX778076_HEADER
|
||||||
# undef AUX_VECTOR_INCLIDE_DIR
|
# undef AUX778076_INCLUDE_DIR
|
||||||
|
|
||||||
#undef BOOST_MPL_PREPROCESSED_HEADER
|
#undef BOOST_MPL_PREPROCESSED_HEADER
|
||||||
|
@@ -22,7 +22,6 @@
|
|||||||
#include <boost/mpl/distance_fwd.hpp>
|
#include <boost/mpl/distance_fwd.hpp>
|
||||||
#include <boost/mpl/next.hpp>
|
#include <boost/mpl/next.hpp>
|
||||||
#include <boost/mpl/prior.hpp>
|
#include <boost/mpl/prior.hpp>
|
||||||
#include <boost/mpl/aux_/iterator_names.hpp>
|
|
||||||
#include <boost/mpl/aux_/nttp_decl.hpp>
|
#include <boost/mpl/aux_/nttp_decl.hpp>
|
||||||
#include <boost/mpl/aux_/value_wknd.hpp>
|
#include <boost/mpl/aux_/value_wknd.hpp>
|
||||||
#include <boost/mpl/aux_/config/ctps.hpp>
|
#include <boost/mpl/aux_/config/ctps.hpp>
|
||||||
@@ -114,6 +113,15 @@ template<> struct advance_impl<aux::v_iter_tag>
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<> struct distance_impl<aux::v_iter_tag>
|
||||||
|
{
|
||||||
|
template< typename Iter1, typename Iter2 > struct apply
|
||||||
|
{
|
||||||
|
enum { pos1_ = Iter1::pos_, pos2_ = Iter2::pos_ };
|
||||||
|
typedef long_<( pos2_ - pos1_ )> type;
|
||||||
|
BOOST_STATIC_CONSTANT(long, value = ( pos2_ - pos1_ ));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -44,6 +44,7 @@ struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c)
|
|||||||
>
|
>
|
||||||
{
|
{
|
||||||
typedef BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) type;
|
typedef BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) type;
|
||||||
|
typedef T value_type;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -63,6 +64,8 @@ template<
|
|||||||
struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c)
|
struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c)
|
||||||
: BOOST_PP_CAT(vector,i_)< BOOST_PP_REPEAT(i_,AUX778076_VECTOR_C_PARAM_FUNC,C) >
|
: BOOST_PP_CAT(vector,i_)< BOOST_PP_REPEAT(i_,AUX778076_VECTOR_C_PARAM_FUNC,C) >
|
||||||
{
|
{
|
||||||
|
typedef BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) type;
|
||||||
|
typedef T value_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
# undef AUX778076_VECTOR_C_PARAM_FUNC
|
# undef AUX778076_VECTOR_C_PARAM_FUNC
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
// $Revision$
|
// $Revision$
|
||||||
|
|
||||||
#include <boost/mpl/aux_/config/typeof.hpp>
|
#include <boost/mpl/aux_/config/typeof.hpp>
|
||||||
|
#include <boost/mpl/aux_/nttp_decl.hpp>
|
||||||
|
|
||||||
namespace boost { namespace mpl { namespace aux {
|
namespace boost { namespace mpl { namespace aux {
|
||||||
|
|
||||||
@@ -23,7 +24,7 @@ struct v_iter_tag;
|
|||||||
#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
|
#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
|
||||||
struct vector_tag;
|
struct vector_tag;
|
||||||
#else
|
#else
|
||||||
template< long N > struct vector_tag;
|
template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct vector_tag;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}}}
|
}}}
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
// $Revision$
|
// $Revision$
|
||||||
|
|
||||||
#include <boost/mpl/vector/vector0.hpp>
|
#include <boost/mpl/vector/vector0.hpp>
|
||||||
|
#include <boost/mpl/integral_c.hpp>
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
@@ -22,6 +23,7 @@ template< typename T > struct vector0_c
|
|||||||
: vector0<>
|
: vector0<>
|
||||||
{
|
{
|
||||||
typedef vector0_c type;
|
typedef vector0_c type;
|
||||||
|
typedef T value_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
@@ -24,17 +24,17 @@
|
|||||||
# include <boost/preprocessor/stringize.hpp>
|
# include <boost/preprocessor/stringize.hpp>
|
||||||
|
|
||||||
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
|
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
|
||||||
# define AUX778076_HEADER \
|
# define AUX778076_VECTOR_C_HEADER \
|
||||||
BOOST_PP_CAT(BOOST_PP_CAT(vector,BOOST_MPL_LIMIT_VECTOR_SIZE),_c).hpp \
|
BOOST_PP_CAT(BOOST_PP_CAT(vector,BOOST_MPL_LIMIT_VECTOR_SIZE),_c).hpp \
|
||||||
/**/
|
/**/
|
||||||
#else
|
#else
|
||||||
# define AUX778076_HEADER \
|
# define AUX778076_VECTOR_C_HEADER \
|
||||||
BOOST_PP_CAT(BOOST_PP_CAT(vector,BOOST_MPL_LIMIT_VECTOR_SIZE),_c)##.hpp \
|
BOOST_PP_CAT(BOOST_PP_CAT(vector,BOOST_MPL_LIMIT_VECTOR_SIZE),_c)##.hpp \
|
||||||
/**/
|
/**/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_HEADER)
|
# include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_VECTOR_C_HEADER)
|
||||||
# undef AUX778076_HEADER
|
# undef AUX778076_VECTOR_C_HEADER
|
||||||
# include <climits>
|
# include <climits>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user