mirror of
https://git.suyu.dev/suyu/ext-boost.git
synced 2026-01-09 07:58:10 +01:00
Update to boost 1.66
This commit is contained in:
parent
9ffbf897dc
commit
d80e506e17
203 changed files with 14820 additions and 2478 deletions
|
|
@ -56,7 +56,7 @@
|
|||
// and GCC (which issues "unused variable" warnings when static constants are used
|
||||
// at a function scope)
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
||||
|| (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0)
|
||||
|| (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0) || defined(__PGI)
|
||||
# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
|
||||
#else
|
||||
# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr)
|
||||
|
|
|
|||
92
boost/mpl/aux_/arithmetic_op.hpp
Normal file
92
boost/mpl/aux_/arithmetic_op.hpp
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
|
||||
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/integral_c.hpp>
|
||||
# include <boost/mpl/aux_/largest_int.hpp>
|
||||
# include <boost/mpl/aux_/value_wknd.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(AUX778076_OP_PREFIX)
|
||||
# define AUX778076_OP_PREFIX AUX778076_OP_NAME
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/numeric_op.hpp>
|
||||
#include <boost/mpl/aux_/config/static_constant.hpp>
|
||||
#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 AUX778076_OP_PREFIX.hpp
|
||||
# include <boost/mpl/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/mpl/aux_/config/workaround.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
#if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
|
||||
namespace aux {
|
||||
template< typename T, T n1, T n2 >
|
||||
struct BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(T, value = (n1 AUX778076_OP_TOKEN n2));
|
||||
typedef integral_c<T,value> type;
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
template<>
|
||||
struct AUX778076_OP_IMPL_NAME<integral_c_tag,integral_c_tag>
|
||||
{
|
||||
template< typename N1, typename N2 > struct apply
|
||||
#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
|
||||
: integral_c<
|
||||
typename aux::largest_int<
|
||||
typename N1::value_type
|
||||
, typename N2::value_type
|
||||
>::type
|
||||
, ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
|
||||
AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(N2)::value
|
||||
)
|
||||
>
|
||||
#else
|
||||
: aux::BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)<
|
||||
typename aux::largest_int<
|
||||
typename N1::value_type
|
||||
, typename N2::value_type
|
||||
>::type
|
||||
, N1::value
|
||||
, N2::value
|
||||
>::type
|
||||
#endif
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
|
||||
#undef AUX778076_OP_TAG_NAME
|
||||
#undef AUX778076_OP_IMPL_NAME
|
||||
#undef AUX778076_OP_ARITY
|
||||
#undef AUX778076_OP_PREFIX
|
||||
#undef AUX778076_OP_NAME
|
||||
#undef AUX778076_OP_TOKEN
|
||||
68
boost/mpl/aux_/insert_impl.hpp
Normal file
68
boost/mpl/aux_/insert_impl.hpp
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
|
||||
#ifndef BOOST_MPL_INSERT_IMPL_HPP_INCLUDED
|
||||
#define BOOST_MPL_INSERT_IMPL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/reverse_fold.hpp>
|
||||
#include <boost/mpl/iterator_range.hpp>
|
||||
#include <boost/mpl/clear.hpp>
|
||||
#include <boost/mpl/push_front.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
// default implementation; conrete sequences might override it by
|
||||
// specializing either the 'insert_impl' or the primary 'insert' template
|
||||
|
||||
template< typename Tag >
|
||||
struct insert_impl
|
||||
{
|
||||
template<
|
||||
typename Sequence
|
||||
, typename Pos
|
||||
, typename T
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
typedef iterator_range<
|
||||
typename begin<Sequence>::type
|
||||
, Pos
|
||||
> first_half_;
|
||||
|
||||
typedef iterator_range<
|
||||
Pos
|
||||
, typename end<Sequence>::type
|
||||
> second_half_;
|
||||
|
||||
typedef typename reverse_fold<
|
||||
second_half_
|
||||
, typename clear<Sequence>::type
|
||||
, push_front<_,_>
|
||||
>::type half_sequence_;
|
||||
|
||||
typedef typename reverse_fold<
|
||||
first_half_
|
||||
, typename push_front<half_sequence_,T>::type
|
||||
, push_front<_,_>
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_impl)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_INSERT_IMPL_HPP_INCLUDED
|
||||
80
boost/mpl/aux_/insert_range_impl.hpp
Normal file
80
boost/mpl/aux_/insert_range_impl.hpp
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
|
||||
#ifndef BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/placeholders.hpp>
|
||||
#include <boost/mpl/fold.hpp>
|
||||
#include <boost/mpl/insert.hpp>
|
||||
#include <boost/mpl/clear.hpp>
|
||||
#include <boost/mpl/joint_view.hpp>
|
||||
#include <boost/mpl/iterator_range.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/iter_push_front.hpp>
|
||||
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
|
||||
#include <boost/mpl/aux_/config/forwarding.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_impl' or the primary
|
||||
// 'insert_range' template
|
||||
|
||||
|
||||
template< typename Tag >
|
||||
struct insert_range_impl
|
||||
{
|
||||
template<
|
||||
typename Sequence
|
||||
, typename Pos
|
||||
, typename Range
|
||||
>
|
||||
struct apply
|
||||
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
|
||||
: reverse_fold<
|
||||
joint_view<
|
||||
iterator_range<typename begin<Sequence>::type,Pos>
|
||||
, joint_view<
|
||||
Range
|
||||
, iterator_range<Pos,typename end<Sequence>::type>
|
||||
>
|
||||
>
|
||||
, typename clear<Sequence>::type
|
||||
, insert<_1, begin<_1>, _2>
|
||||
>
|
||||
{
|
||||
#else
|
||||
{
|
||||
typedef typename reverse_fold<
|
||||
joint_view<
|
||||
iterator_range<typename begin<Sequence>::type,Pos>
|
||||
, joint_view<
|
||||
Range
|
||||
, iterator_range<Pos,typename end<Sequence>::type>
|
||||
>
|
||||
>
|
||||
, typename clear<Sequence>::type
|
||||
, insert<_1, begin<_1>, _2>
|
||||
>::type type;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_range_impl)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
|
||||
36
boost/mpl/aux_/iter_push_front.hpp
Normal file
36
boost/mpl/aux_/iter_push_front.hpp
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
#ifndef BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED
|
||||
#define BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/push_front.hpp>
|
||||
#include <boost/mpl/deref.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
template<
|
||||
typename Sequence
|
||||
, typename Iterator
|
||||
>
|
||||
struct iter_push_front
|
||||
{
|
||||
typedef typename push_front<
|
||||
Sequence
|
||||
, typename deref<Iterator>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED
|
||||
120
boost/mpl/aux_/joint_iter.hpp
Normal file
120
boost/mpl/aux_/joint_iter.hpp
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
|
||||
#ifndef BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/next_prior.hpp>
|
||||
#include <boost/mpl/deref.hpp>
|
||||
#include <boost/mpl/iterator_tags.hpp>
|
||||
#include <boost/mpl/aux_/lambda_spec.hpp>
|
||||
#include <boost/mpl/aux_/config/ctps.hpp>
|
||||
|
||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
# include <boost/type_traits/is_same.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
|
||||
template<
|
||||
typename Iterator1
|
||||
, typename LastIterator1
|
||||
, typename Iterator2
|
||||
>
|
||||
struct joint_iter
|
||||
{
|
||||
typedef Iterator1 base;
|
||||
typedef forward_iterator_tag category;
|
||||
};
|
||||
|
||||
template<
|
||||
typename LastIterator1
|
||||
, typename Iterator2
|
||||
>
|
||||
struct joint_iter<LastIterator1,LastIterator1,Iterator2>
|
||||
{
|
||||
typedef Iterator2 base;
|
||||
typedef forward_iterator_tag category;
|
||||
};
|
||||
|
||||
|
||||
template< typename I1, typename L1, typename I2 >
|
||||
struct deref< joint_iter<I1,L1,I2> >
|
||||
{
|
||||
typedef typename joint_iter<I1,L1,I2>::base base_;
|
||||
typedef typename deref<base_>::type type;
|
||||
};
|
||||
|
||||
template< typename I1, typename L1, typename I2 >
|
||||
struct next< joint_iter<I1,L1,I2> >
|
||||
{
|
||||
typedef joint_iter< typename mpl::next<I1>::type,L1,I2 > type;
|
||||
};
|
||||
|
||||
template< typename L1, typename I2 >
|
||||
struct next< joint_iter<L1,L1,I2> >
|
||||
{
|
||||
typedef joint_iter< L1,L1,typename mpl::next<I2>::type > type;
|
||||
};
|
||||
|
||||
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
template<
|
||||
typename Iterator1
|
||||
, typename LastIterator1
|
||||
, typename Iterator2
|
||||
>
|
||||
struct joint_iter;
|
||||
|
||||
template< bool > struct joint_iter_impl
|
||||
{
|
||||
template< typename I1, typename L1, typename I2 > struct result_
|
||||
{
|
||||
typedef I1 base;
|
||||
typedef forward_iterator_tag category;
|
||||
typedef joint_iter< typename mpl::next<I1>::type,L1,I2 > next;
|
||||
typedef typename deref<I1>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct joint_iter_impl<true>
|
||||
{
|
||||
template< typename I1, typename L1, typename I2 > struct result_
|
||||
{
|
||||
typedef I2 base;
|
||||
typedef forward_iterator_tag category;
|
||||
typedef joint_iter< L1,L1,typename mpl::next<I2>::type > next;
|
||||
typedef typename deref<I2>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
template<
|
||||
typename Iterator1
|
||||
, typename LastIterator1
|
||||
, typename Iterator2
|
||||
>
|
||||
struct joint_iter
|
||||
: joint_iter_impl< is_same<Iterator1,LastIterator1>::value >
|
||||
::template result_<Iterator1,LastIterator1,Iterator2>
|
||||
{
|
||||
};
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, joint_iter)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
|
||||
63
boost/mpl/aux_/largest_int.hpp
Normal file
63
boost/mpl/aux_/largest_int.hpp
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
|
||||
#ifndef BOOST_MPL_AUX_LARGEST_INT_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_LARGEST_INT_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/aux_/config/integral.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
template< typename T > struct integral_rank;
|
||||
|
||||
template<> struct integral_rank<bool> : int_<1> {};
|
||||
template<> struct integral_rank<signed char> : int_<2> {};
|
||||
template<> struct integral_rank<char> : int_<3> {};
|
||||
template<> struct integral_rank<unsigned char> : int_<4> {};
|
||||
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
|
||||
template<> struct integral_rank<wchar_t> : int_<5> {};
|
||||
#endif
|
||||
template<> struct integral_rank<short> : int_<6> {};
|
||||
template<> struct integral_rank<unsigned short> : int_<7> {};
|
||||
template<> struct integral_rank<int> : int_<8> {};
|
||||
template<> struct integral_rank<unsigned int> : int_<9> {};
|
||||
template<> struct integral_rank<long> : int_<10> {};
|
||||
template<> struct integral_rank<unsigned long> : int_<11> {};
|
||||
|
||||
#if defined(BOOST_HAS_LONG_LONG)
|
||||
template<> struct integral_rank<long_long_type> : int_<12> {};
|
||||
template<> struct integral_rank<ulong_long_type>: int_<13> {};
|
||||
#endif
|
||||
|
||||
template< typename T1, typename T2 > struct largest_int
|
||||
#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
|
||||
: if_c<
|
||||
( integral_rank<T1>::value >= integral_rank<T2>::value )
|
||||
, T1
|
||||
, T2
|
||||
>
|
||||
{
|
||||
#else
|
||||
{
|
||||
enum { rank1 = integral_rank<T1>::value };
|
||||
enum { rank2 = integral_rank<T2>::value };
|
||||
typedef typename if_c< (rank1 >= rank2),T1,T2 >::type type;
|
||||
#endif
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_LARGEST_INT_HPP_INCLUDED
|
||||
41
boost/mpl/insert.hpp
Normal file
41
boost/mpl/insert.hpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
|
||||
#ifndef BOOST_MPL_INSERT_HPP_INCLUDED
|
||||
#define BOOST_MPL_INSERT_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/insert_fwd.hpp>
|
||||
#include <boost/mpl/sequence_tag.hpp>
|
||||
#include <boost/mpl/aux_/insert_impl.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(Pos_or_T)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(T)
|
||||
>
|
||||
struct insert
|
||||
: insert_impl< typename sequence_tag<Sequence>::type >
|
||||
::template apply< Sequence,Pos_or_T,T >
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert,(Sequence,Pos_or_T,T))
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC(3, insert)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_INSERT_HPP_INCLUDED
|
||||
24
boost/mpl/insert_fwd.hpp
Normal file
24
boost/mpl/insert_fwd.hpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
#ifndef BOOST_MPL_INSERT_FWD_HPP_INCLUDED
|
||||
#define BOOST_MPL_INSERT_FWD_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template< typename Tag > struct insert_impl;
|
||||
template< typename Sequence, typename Pos_or_T, typename T > struct insert;
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_INSERT_FWD_HPP_INCLUDED
|
||||
41
boost/mpl/insert_range.hpp
Normal file
41
boost/mpl/insert_range.hpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
|
||||
#ifndef BOOST_MPL_INSERT_RANGE_HPP_INCLUDED
|
||||
#define BOOST_MPL_INSERT_RANGE_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/insert_range_fwd.hpp>
|
||||
#include <boost/mpl/sequence_tag.hpp>
|
||||
#include <boost/mpl/aux_/insert_range_impl.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(Pos)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(Range)
|
||||
>
|
||||
struct insert_range
|
||||
: insert_range_impl< typename sequence_tag<Sequence>::type >
|
||||
::template apply< Sequence,Pos,Range >
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert_range,(Sequence,Pos,Range))
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC(3, insert_range)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_INSERT_RANGE_HPP_INCLUDED
|
||||
24
boost/mpl/insert_range_fwd.hpp
Normal file
24
boost/mpl/insert_range_fwd.hpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
#ifndef BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED
|
||||
#define BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template< typename Tag > struct insert_range_impl;
|
||||
template< typename Sequence, typename Pos, typename Range > struct insert_range;
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED
|
||||
65
boost/mpl/joint_view.hpp
Normal file
65
boost/mpl/joint_view.hpp
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
|
||||
#ifndef BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
|
||||
#define BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/joint_iter.hpp>
|
||||
#include <boost/mpl/plus.hpp>
|
||||
#include <boost/mpl/size_fwd.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
struct joint_view_tag;
|
||||
}
|
||||
|
||||
template<>
|
||||
struct size_impl< aux::joint_view_tag >
|
||||
{
|
||||
template < typename JointView > struct apply
|
||||
: plus<
|
||||
size<typename JointView::sequence1_>
|
||||
, size<typename JointView::sequence2_>
|
||||
>
|
||||
{};
|
||||
};
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence1_)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(Sequence2_)
|
||||
>
|
||||
struct joint_view
|
||||
{
|
||||
typedef typename mpl::begin<Sequence1_>::type first1_;
|
||||
typedef typename mpl::end<Sequence1_>::type last1_;
|
||||
typedef typename mpl::begin<Sequence2_>::type first2_;
|
||||
typedef typename mpl::end<Sequence2_>::type last2_;
|
||||
|
||||
// agurt, 25/may/03: for the 'size_traits' implementation above
|
||||
typedef Sequence1_ sequence1_;
|
||||
typedef Sequence2_ sequence2_;
|
||||
|
||||
typedef joint_view type;
|
||||
typedef aux::joint_view_tag tag;
|
||||
typedef joint_iter<first1_,last1_,first2_> begin;
|
||||
typedef joint_iter<last1_,last1_,last2_> end;
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC(2, joint_view)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
|
||||
21
boost/mpl/plus.hpp
Normal file
21
boost/mpl/plus.hpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
#ifndef BOOST_MPL_PLUS_HPP_INCLUDED
|
||||
#define BOOST_MPL_PLUS_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#define AUX778076_OP_NAME plus
|
||||
#define AUX778076_OP_TOKEN +
|
||||
#include <boost/mpl/aux_/arithmetic_op.hpp>
|
||||
|
||||
#endif // BOOST_MPL_PLUS_HPP_INCLUDED
|
||||
Loading…
Add table
Add a link
Reference in a new issue